| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 4 # for details. All rights reserved. Use of this source code is governed by a | 4 # for details. All rights reserved. Use of this source code is governed by a |
| 5 # BSD-style license that can be found in the LICENSE file. | 5 # BSD-style license that can be found in the LICENSE file. |
| 6 # | 6 # |
| 7 | 7 |
| 8 import optparse | 8 import optparse |
| 9 import os | 9 import os |
| 10 import re | 10 import re |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 result = optparse.OptionParser() | 38 result = optparse.OptionParser() |
| 39 result.add_option("-m", "--mode", | 39 result.add_option("-m", "--mode", |
| 40 help='Build variants (comma-separated).', | 40 help='Build variants (comma-separated).', |
| 41 metavar='[all,debug,release]', | 41 metavar='[all,debug,release]', |
| 42 default='debug') | 42 default='debug') |
| 43 result.add_option("-v", "--verbose", | 43 result.add_option("-v", "--verbose", |
| 44 help='Verbose output.', | 44 help='Verbose output.', |
| 45 default=False, action="store_true") | 45 default=False, action="store_true") |
| 46 result.add_option("-a", "--arch", | 46 result.add_option("-a", "--arch", |
| 47 help='Target architectures (comma-separated).', | 47 help='Target architectures (comma-separated).', |
| 48 metavar='[all,ia32,x64,simarm,arm,simmips,mips,simarm64]', | 48 metavar='[all,ia32,x64,simarm,arm,simmips,mips,simarm64,arm64,]', |
| 49 default=utils.GuessArchitecture()) | 49 default=utils.GuessArchitecture()) |
| 50 result.add_option("--os", | 50 result.add_option("--os", |
| 51 help='Target OSs (comma-separated).', | 51 help='Target OSs (comma-separated).', |
| 52 metavar='[all,host,android]', | 52 metavar='[all,host,android]', |
| 53 default='host') | 53 default='host') |
| 54 result.add_option("-t", "--toolchain", | 54 result.add_option("-t", "--toolchain", |
| 55 help='Cross-compiler toolchain path', | 55 help='Cross-compiler toolchain path', |
| 56 default=None) | 56 default=None) |
| 57 result.add_option("-j", | 57 result.add_option("-j", |
| 58 help='The number of parallel jobs to run.', | 58 help='The number of parallel jobs to run.', |
| (...skipping 24 matching lines...) Expand all Loading... |
| 83 if options.os == 'all': | 83 if options.os == 'all': |
| 84 options.os = 'host,android' | 84 options.os = 'host,android' |
| 85 options.mode = options.mode.split(',') | 85 options.mode = options.mode.split(',') |
| 86 options.arch = options.arch.split(',') | 86 options.arch = options.arch.split(',') |
| 87 options.os = options.os.split(',') | 87 options.os = options.os.split(',') |
| 88 for mode in options.mode: | 88 for mode in options.mode: |
| 89 if not mode in ['debug', 'release']: | 89 if not mode in ['debug', 'release']: |
| 90 print "Unknown mode %s" % mode | 90 print "Unknown mode %s" % mode |
| 91 return False | 91 return False |
| 92 for arch in options.arch: | 92 for arch in options.arch: |
| 93 archs = ['ia32', 'x64', 'simarm', 'arm', 'simmips', 'mips', 'simarm64'] | 93 archs = ['ia32', 'x64', 'simarm', 'arm', 'simmips', 'mips', |
| 94 'simarm64', 'arm64',] |
| 94 if not arch in archs: | 95 if not arch in archs: |
| 95 print "Unknown arch %s" % arch | 96 print "Unknown arch %s" % arch |
| 96 return False | 97 return False |
| 97 options.os = [ProcessOsOption(os) for os in options.os] | 98 options.os = [ProcessOsOption(os) for os in options.os] |
| 98 for os in options.os: | 99 for os in options.os: |
| 99 if not os in ['android', 'freebsd', 'linux', 'macos', 'win32']: | 100 if not os in ['android', 'freebsd', 'linux', 'macos', 'win32']: |
| 100 print "Unknown os %s" % os | 101 print "Unknown os %s" % os |
| 101 return False | 102 return False |
| 102 if os != HOST_OS: | 103 if os != HOST_OS: |
| 103 if os != 'android': | 104 if os != 'android': |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 NotifyBuildDone(build_config, success=False, start=start_time) | 464 NotifyBuildDone(build_config, success=False, start=start_time) |
| 464 return 1 | 465 return 1 |
| 465 else: | 466 else: |
| 466 NotifyBuildDone(build_config, success=True, start=start_time) | 467 NotifyBuildDone(build_config, success=True, start=start_time) |
| 467 | 468 |
| 468 return 0 | 469 return 0 |
| 469 | 470 |
| 470 | 471 |
| 471 if __name__ == '__main__': | 472 if __name__ == '__main__': |
| 472 sys.exit(Main()) | 473 sys.exit(Main()) |
| OLD | NEW |