GN: Fix build

GN is unhappy when a rule that consumes a file generated by
another rule doesn't depend directly on that rule.

This change also quiets output from invoking Dart to follow the
rule of GN builds that a successful build generates no output.

Review URL: https://codereview.chromium.org/2446473002 .
This commit is contained in:
Zachary Anderson 2016-10-22 00:05:39 -07:00
parent c9537f56e4
commit c39525802e
3 changed files with 15 additions and 10 deletions

View file

@ -56,7 +56,8 @@ action("create_sdk") {
deps = [
"runtime/bin:dart",
"utils/analysis_server",
"utils/compiler",
"utils/compiler:dart2js",
"utils/compiler:utils_wrapper",
"utils/dartanalyzer:generate_dartanalyzer_snapshot",
"utils/dartanalyzer:generate_summary_spec",
"utils/dartanalyzer:generate_summary_strong",

View file

@ -13,12 +13,23 @@
import subprocess
import sys
def run_command(command):
try:
subprocess.check_output(command, stderr=subprocess.STDOUT)
return 0
except subprocess.CalledProcessError as e:
return ("Command failed: " + ' '.join(command) + "\n" +
"output: " + e.output)
def main(argv):
if len(argv) < 2:
print "Requires path to Dart VM binary as first argument"
return -1
command = argv[1:]
return subprocess.call(command)
result = run_command(argv[1:])
if result != 0:
print result
return -1
return 0
if __name__ == '__main__':
sys.exit(main(sys.argv))

View file

@ -71,10 +71,3 @@ application_snapshot("utils_wrapper") {
main_dart = "$root_gen_dir/utils_wrapper.dart"
training_args = [ "--help" ]
}
group("compiler") {
deps = [
":dart2js",
":utils_wrapper",
]
}