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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 | 92 |
93 | 93 |
94 def ProcessOsOption(os_name): | 94 def ProcessOsOption(os_name): |
95 if os_name == 'host': | 95 if os_name == 'host': |
96 return HOST_OS | 96 return HOST_OS |
97 return os_name | 97 return os_name |
98 | 98 |
99 | 99 |
100 def ProcessOptions(options, args): | 100 def ProcessOptions(options, args): |
101 if options.arch == 'all': | 101 if options.arch == 'all': |
102 options.arch = 'ia32,x64,simarm,simarm64,simmips,simdbc64' | 102 options.arch = 'ia32,x64,simarm,simarm64,simdbc64' |
103 if options.mode == 'all': | 103 if options.mode == 'all': |
104 options.mode = 'debug,release,product' | 104 options.mode = 'debug,release,product' |
105 if options.os == 'all': | 105 if options.os == 'all': |
106 options.os = 'host,android' | 106 options.os = 'host,android' |
107 options.mode = options.mode.split(',') | 107 options.mode = options.mode.split(',') |
108 options.arch = options.arch.split(',') | 108 options.arch = options.arch.split(',') |
109 options.os = options.os.split(',') | 109 options.os = options.os.split(',') |
110 if not options.gyp and options.toolchain != None: | 110 if not options.gyp and options.toolchain != None: |
111 print "The --toolchain flag is only supported by the gyp build." | 111 print "The --toolchain flag is only supported by the gyp build." |
112 print "When using the GN build, set the toolchain and sysroot using gn.py." | 112 print "When using the GN build, set the toolchain and sysroot using gn.py." |
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
477 # If we couldn't ensure that goma is started, let the build start, but | 477 # If we couldn't ensure that goma is started, let the build start, but |
478 # slowly so we can see any helpful error messages that pop out. | 478 # slowly so we can see any helpful error messages that pop out. |
479 command += ['-j1'] | 479 command += ['-j1'] |
480 command += [target] | 480 command += [target] |
481 return command | 481 return command |
482 | 482 |
483 | 483 |
484 filter_xcodebuild_output = False | 484 filter_xcodebuild_output = False |
485 def BuildOneConfig(options, target, target_os, mode, arch): | 485 def BuildOneConfig(options, target, target_os, mode, arch): |
486 global filter_xcodebuild_output | 486 global filter_xcodebuild_output |
| 487 if arch.startswith('mips'): |
| 488 bold = '\033[1m' |
| 489 reset = '\033[0m' |
| 490 print(bold + "Warning: MIPS architectures are unlikely to be supported in " |
| 491 "upcoming releases. Please consider using another architecture " |
| 492 "and/or file an issue explaining your specific use of and need for " |
| 493 "MIPS support." + reset) |
487 start_time = time.time() | 494 start_time = time.time() |
488 args = [] | 495 args = [] |
489 build_config = utils.GetBuildConf(mode, arch, target_os) | 496 build_config = utils.GetBuildConf(mode, arch, target_os) |
490 if not options.gyp: | 497 if not options.gyp: |
491 args = BuildNinjaCommand(options, target, target_os, mode, arch) | 498 args = BuildNinjaCommand(options, target, target_os, mode, arch) |
492 else: | 499 else: |
493 os.environ['DART_BUILD_MODE'] = mode | 500 os.environ['DART_BUILD_MODE'] = mode |
494 if HOST_OS == 'macos': | 501 if HOST_OS == 'macos': |
495 filter_xcodebuild_output = True | 502 filter_xcodebuild_output = True |
496 project_file = 'dart.xcodeproj' | 503 project_file = 'dart.xcodeproj' |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
609 for arch in options.arch: | 616 for arch in options.arch: |
610 if BuildOneConfig(options, target, target_os, | 617 if BuildOneConfig(options, target, target_os, |
611 mode, arch) != 0: | 618 mode, arch) != 0: |
612 return 1 | 619 return 1 |
613 | 620 |
614 return 0 | 621 return 0 |
615 | 622 |
616 | 623 |
617 if __name__ == '__main__': | 624 if __name__ == '__main__': |
618 sys.exit(Main()) | 625 sys.exit(Main()) |
OLD | NEW |