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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
101 print "Unknown mode %s" % mode | 101 print "Unknown mode %s" % mode |
102 return False | 102 return False |
103 for arch in options.arch: | 103 for arch in options.arch: |
104 archs = ['ia32', 'x64', 'simarm', 'arm', 'simarmv5te', 'armv5te', 'simmips', | 104 archs = ['ia32', 'x64', 'simarm', 'arm', 'simarmv5te', 'armv5te', 'simmips', |
105 'mips', 'simarm64', 'arm64',] | 105 'mips', 'simarm64', 'arm64',] |
106 if not arch in archs: | 106 if not arch in archs: |
107 print "Unknown arch %s" % arch | 107 print "Unknown arch %s" % arch |
108 return False | 108 return False |
109 options.os = [ProcessOsOption(os_name) for os_name in options.os] | 109 options.os = [ProcessOsOption(os_name) for os_name in options.os] |
110 for os_name in options.os: | 110 for os_name in options.os: |
111 if not os_name in ['android', 'freebsd', 'linux', 'macos', 'win32']: | 111 if not os_name in ['android', 'freebsd', 'linux', 'macos', 'openbsd', 'win32 ']: |
ricow1
2016/01/05 07:12:13
long line
mulander
2016/01/05 16:13:49
Acknowledged.
mulander
2016/01/05 16:13:49
Done.
| |
112 print "Unknown os %s" % os_name | 112 print "Unknown os %s" % os_name |
113 return False | 113 return False |
114 if os_name != HOST_OS: | 114 if os_name != HOST_OS: |
115 if os_name != 'android': | 115 if os_name != 'android': |
116 print "Unsupported target os %s" % os_name | 116 print "Unsupported target os %s" % os_name |
117 return False | 117 return False |
118 if not HOST_OS in ['linux']: | 118 if not HOST_OS in ['linux']: |
119 print ("Cross-compilation to %s is not supported on host os %s." | 119 print ("Cross-compilation to %s is not supported on host os %s." |
120 % (os_name, HOST_OS)) | 120 % (os_name, HOST_OS)) |
121 return False | 121 return False |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
423 else: | 423 else: |
424 args = [options.devenv + os.sep + options.executable, | 424 args = [options.devenv + os.sep + options.executable, |
425 '/build', | 425 '/build', |
426 config_name, | 426 config_name, |
427 '/project', | 427 '/project', |
428 target, | 428 target, |
429 project_file | 429 project_file |
430 ] | 430 ] |
431 else: | 431 else: |
432 make = 'make' | 432 make = 'make' |
433 if HOST_OS == 'freebsd': | 433 if HOST_OS in ('freebsd', 'openbsd'): |
434 make = 'gmake' | 434 make = 'gmake' |
435 # work around lack of flock | 435 # work around lack of flock |
436 os.environ['LINK'] = '$(CXX)' | 436 os.environ['LINK'] = '$(CXX)' |
437 args = [make, | 437 args = [make, |
438 '-j', | 438 '-j', |
439 options.j, | 439 options.j, |
440 'BUILDTYPE=' + build_config, | 440 'BUILDTYPE=' + build_config, |
441 ] | 441 ] |
442 if target_os != HOST_OS: | 442 if target_os != HOST_OS: |
443 args += ['builddir_name=' + utils.GetBuildDir(HOST_OS)] | 443 args += ['builddir_name=' + utils.GetBuildDir(HOST_OS)] |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
550 else: | 550 else: |
551 if BuildOneConfig(options, target, target_os, | 551 if BuildOneConfig(options, target, target_os, |
552 mode, arch, cross_build) != 0: | 552 mode, arch, cross_build) != 0: |
553 return 1 | 553 return 1 |
554 | 554 |
555 return 0 | 555 return 0 |
556 | 556 |
557 | 557 |
558 if __name__ == '__main__': | 558 if __name__ == '__main__': |
559 sys.exit(Main()) | 559 sys.exit(Main()) |
OLD | NEW |