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 shutil | 10 import shutil |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 else: | 315 else: |
316 target = args[0] | 316 target = args[0] |
317 | 317 |
318 filter_xcodebuild_output = False | 318 filter_xcodebuild_output = False |
319 # Remember path | 319 # Remember path |
320 old_path = os.environ['PATH'] | 320 old_path = os.environ['PATH'] |
321 # Build the targets for each requested configuration. | 321 # Build the targets for each requested configuration. |
322 for target_os in options.os: | 322 for target_os in options.os: |
323 for mode in options.mode: | 323 for mode in options.mode: |
324 for arch in options.arch: | 324 for arch in options.arch: |
| 325 os.environ['DART_BUILD_MODE'] = mode |
325 build_config = utils.GetBuildConf(mode, arch) | 326 build_config = utils.GetBuildConf(mode, arch) |
326 if HOST_OS == 'macos': | 327 if HOST_OS == 'macos': |
327 filter_xcodebuild_output = True | 328 filter_xcodebuild_output = True |
328 project_file = 'dart.xcodeproj' | 329 project_file = 'dart.xcodeproj' |
329 if os.path.exists('dart-%s.gyp' % CurrentDirectoryBaseName()): | 330 if os.path.exists('dart-%s.gyp' % CurrentDirectoryBaseName()): |
330 project_file = 'dart-%s.xcodeproj' % CurrentDirectoryBaseName() | 331 project_file = 'dart-%s.xcodeproj' % CurrentDirectoryBaseName() |
331 args = ['xcodebuild', | 332 args = ['xcodebuild', |
332 '-project', | 333 '-project', |
333 project_file, | 334 project_file, |
334 '-target', | 335 '-target', |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 process.wait() | 406 process.wait() |
406 if process.returncode != 0: | 407 if process.returncode != 0: |
407 print "BUILD FAILED" | 408 print "BUILD FAILED" |
408 return 1 | 409 return 1 |
409 | 410 |
410 return 0 | 411 return 0 |
411 | 412 |
412 | 413 |
413 if __name__ == '__main__': | 414 if __name__ == '__main__': |
414 sys.exit(Main()) | 415 sys.exit(Main()) |
OLD | NEW |