mirror of
https://github.com/dart-lang/sdk
synced 2024-10-03 00:09:20 +00:00
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:
parent
c9537f56e4
commit
c39525802e
3
BUILD.gn
3
BUILD.gn
|
@ -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",
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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",
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue