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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
48 result = optparse.OptionParser(usage=usage) | 48 result = optparse.OptionParser(usage=usage) |
49 result.add_option("-m", "--mode", | 49 result.add_option("-m", "--mode", |
50 help='Build variants (comma-separated).', | 50 help='Build variants (comma-separated).', |
51 metavar='[all,debug,release]', | 51 metavar='[all,debug,release]', |
52 default='debug') | 52 default='debug') |
53 result.add_option("-v", "--verbose", | 53 result.add_option("-v", "--verbose", |
54 help='Verbose output.', | 54 help='Verbose output.', |
55 default=False, action="store_true") | 55 default=False, action="store_true") |
56 result.add_option("-a", "--arch", | 56 result.add_option("-a", "--arch", |
57 help='Target architectures (comma-separated).', | 57 help='Target architectures (comma-separated).', |
58 metavar='[all,ia32,x64,simarm,arm,armv5te,simmips,mips,simarm64,arm64,]', | 58 metavar='[all,ia32,x64,simarm,arm,simarmv5te,armv5te,simmips,mips,simarm64 ,arm64,]', |
ricow1
2015/04/10 08:23:41
long line
zra
2015/04/10 16:07:20
Done.
| |
59 default=utils.GuessArchitecture()) | 59 default=utils.GuessArchitecture()) |
60 result.add_option("--os", | 60 result.add_option("--os", |
61 help='Target OSs (comma-separated).', | 61 help='Target OSs (comma-separated).', |
62 metavar='[all,host,android]', | 62 metavar='[all,host,android]', |
63 default='host') | 63 default='host') |
64 result.add_option("-t", "--toolchain", | 64 result.add_option("-t", "--toolchain", |
65 help='Cross-compiler toolchain path', | 65 help='Cross-compiler toolchain path', |
66 default=None) | 66 default=None) |
67 result.add_option("-j", | 67 result.add_option("-j", |
68 help='The number of parallel jobs to run.', | 68 help='The number of parallel jobs to run.', |
(...skipping 29 matching lines...) Expand all Loading... | |
98 if options.os == 'all': | 98 if options.os == 'all': |
99 options.os = 'host,android' | 99 options.os = 'host,android' |
100 options.mode = options.mode.split(',') | 100 options.mode = options.mode.split(',') |
101 options.arch = options.arch.split(',') | 101 options.arch = options.arch.split(',') |
102 options.os = options.os.split(',') | 102 options.os = options.os.split(',') |
103 for mode in options.mode: | 103 for mode in options.mode: |
104 if not mode in ['debug', 'release']: | 104 if not mode in ['debug', 'release']: |
105 print "Unknown mode %s" % mode | 105 print "Unknown mode %s" % mode |
106 return False | 106 return False |
107 for arch in options.arch: | 107 for arch in options.arch: |
108 archs = ['ia32', 'x64', 'simarm', 'arm', 'armv5te', 'simmips', 'mips', | 108 archs = ['ia32', 'x64', 'simarm', 'arm', 'simarmv5te', 'armv5te', 'simmips', |
109 'simarm64', 'arm64',] | 109 'mips', 'simarm64', 'arm64',] |
ricow1
2015/04/10 08:23:41
I would indent this one less space
zra
2015/04/10 16:07:20
Done.
| |
110 if not arch in archs: | 110 if not arch in archs: |
111 print "Unknown arch %s" % arch | 111 print "Unknown arch %s" % arch |
112 return False | 112 return False |
113 options.os = [ProcessOsOption(os_name) for os_name in options.os] | 113 options.os = [ProcessOsOption(os_name) for os_name in options.os] |
114 for os_name in options.os: | 114 for os_name in options.os: |
115 if not os_name in ['android', 'freebsd', 'linux', 'macos', 'win32']: | 115 if not os_name in ['android', 'freebsd', 'linux', 'macos', 'win32']: |
116 print "Unknown os %s" % os_name | 116 print "Unknown os %s" % os_name |
117 return False | 117 return False |
118 if os_name != HOST_OS: | 118 if os_name != HOST_OS: |
119 if os_name != 'android': | 119 if os_name != 'android': |
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
556 else: | 556 else: |
557 if BuildOneConfig(options, target, target_os, | 557 if BuildOneConfig(options, target, target_os, |
558 mode, arch, cross_build) != 0: | 558 mode, arch, cross_build) != 0: |
559 return 1 | 559 return 1 |
560 | 560 |
561 return 0 | 561 return 0 |
562 | 562 |
563 | 563 |
564 if __name__ == '__main__': | 564 if __name__ == '__main__': |
565 sys.exit(Main()) | 565 sys.exit(Main()) |
OLD | NEW |