Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Side by Side Diff: tools/patch_sdk.py

Issue 2469683002: Emit patched_sdk in the root output directory. (Closed)
Patch Set: Martin's comment Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/vm.gypi ('k') | tools/testing/dart/compiler_configuration.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
3 # for details. All rights reserved. Use of this source code is governed by a 3 # for details. All rights reserved. Use of this source code is governed by a
4 # BSD-style license that can be found in the LICENSE file. 4 # BSD-style license that can be found in the LICENSE file.
5 5
6 import argparse 6 import argparse
7 import os 7 import os
8 import subprocess 8 import subprocess
9 import sys 9 import sys
10 import utils 10 import utils
11 11
12 usage = """patch_sdk.py [options]""" 12 usage = """patch_sdk.py [options]"""
13 13
14 def DisplayBootstrapWarning():
15 print """\
16
17
18 WARNING: Your system cannot run the checked-in Dart SDK. Using the
19 bootstrap Dart executable will make debug builds slow.
20 Please see the Wiki for instructions on replacing the checked-in Dart SDK.
21
22 https://github.com/dart-lang/sdk/wiki/The-checked-in-SDK-in-tools
23
24 """
25
14 def BuildArguments(): 26 def BuildArguments():
15 result = argparse.ArgumentParser(usage=usage) 27 result = argparse.ArgumentParser(usage=usage)
16 result.add_argument("--dart-executable", help="dart executable", default=None) 28 result.add_argument("--dart-executable", help="dart executable", default=None)
17 return result 29 return result
18 30
19 def main(): 31 def main():
20 # Parse the options. 32 # Parse the options.
21 parser = BuildArguments() 33 parser = BuildArguments()
22 (options, args) = parser.parse_known_args() 34 (options, args) = parser.parse_known_args()
23 if options.dart_executable is not None: 35 if utils.CheckedInSdkCheckExecutable():
36 options.dart_executable = utils.CheckedInSdkExecutable()
37 elif options.dart_executable is not None:
38 DisplayBootstrapWarning()
24 options.dart_executable = os.path.abspath(options.dart_executable) 39 options.dart_executable = os.path.abspath(options.dart_executable)
25 else: 40 else:
26 options.dart_executable = os.path.join(utils.CheckedInSdkPath(), 'bin', 'dar t') 41 print >> sys.stderr, 'ERROR: cannot locate dart executable'
42 return -1
27 dart_file = os.path.join(os.path.dirname(__file__), 'patch_sdk.dart') 43 dart_file = os.path.join(os.path.dirname(__file__), 'patch_sdk.dart')
28 subprocess.check_call([options.dart_executable, dart_file] + args); 44 subprocess.check_call([options.dart_executable, dart_file] + args)
45 return 0
29 46
30 if __name__ == '__main__': 47 if __name__ == '__main__':
31 main() 48 sys.exit(main())
OLDNEW
« no previous file with comments | « runtime/vm/vm.gypi ('k') | tools/testing/dart/compiler_configuration.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698