mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 04:06:59 +00:00
Don't spew DDC SDK build warnings when building.
Change-Id: I56b829e218a970ca8186910481422a5b9d25150c Reviewed-on: https://dart-review.googlesource.com/22720 Reviewed-by: Zach Anderson <zra@google.com> Commit-Queue: Bob Nystrom <rnystrom@google.com>
This commit is contained in:
parent
4e5118ba0a
commit
37cd5e33ce
|
@ -28,6 +28,10 @@ def BuildArguments():
|
|||
result.add_argument("--dart",
|
||||
help="dart executable",
|
||||
default=None)
|
||||
result.add_argument("-q", "--quiet",
|
||||
help="emit no output",
|
||||
default=False,
|
||||
action="store_true")
|
||||
return result
|
||||
|
||||
def main():
|
||||
|
@ -43,8 +47,14 @@ def main():
|
|||
print >> sys.stderr, 'ERROR: cannot locate dart executable'
|
||||
return -1
|
||||
|
||||
subprocess.check_call([options.dart_executable] + args)
|
||||
return 0
|
||||
if options.quiet:
|
||||
# Pipe output to /dev/null. See https://stackoverflow.com/a/14736249/9457.
|
||||
out = open(os.devnull, 'w')
|
||||
else:
|
||||
out = None
|
||||
|
||||
return subprocess.call([options.dart_executable] + args,
|
||||
stdout=out, stderr=out)
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
||||
|
|
|
@ -193,6 +193,7 @@ action("dartdevc_sdk") {
|
|||
}
|
||||
|
||||
args = [
|
||||
"--quiet",
|
||||
rebase_path("../../pkg/dev_compiler/tool/build_sdk.dart"),
|
||||
"--dart-sdk",
|
||||
rebase_path(patched_sdk_dir),
|
||||
|
|
Loading…
Reference in a new issue