Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """Entry point for both build and try bots. | 6 """Entry point for both build and try bots. |
| 7 | 7 |
| 8 This script is invoked from XXX, usually without arguments | 8 This script is invoked from XXX, usually without arguments |
| 9 to package an SDK. It automatically determines whether | 9 to package an SDK. It automatically determines whether |
| 10 this SDK is for mac, win, linux. | 10 this SDK is for mac, win, linux. |
| (...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 530 out_dir, force_arm_gcc=True): | 530 out_dir, force_arm_gcc=True): |
| 531 gyp_env = dict(os.environ) | 531 gyp_env = dict(os.environ) |
| 532 gyp_env['GYP_GENERATORS'] = 'ninja' | 532 gyp_env['GYP_GENERATORS'] = 'ninja' |
| 533 gyp_defines = [] | 533 gyp_defines = [] |
| 534 if options.mac_sdk: | 534 if options.mac_sdk: |
| 535 gyp_defines.append('mac_sdk=%s' % options.mac_sdk) | 535 gyp_defines.append('mac_sdk=%s' % options.mac_sdk) |
| 536 if arch: | 536 if arch: |
| 537 gyp_defines.append('target_arch=%s' % arch) | 537 gyp_defines.append('target_arch=%s' % arch) |
| 538 if arch == 'arm': | 538 if arch == 'arm': |
| 539 if getos.GetPlatform() == 'linux': | 539 if getos.GetPlatform() == 'linux': |
| 540 gyp_env['CC'] = 'arm-linux-gnueabihf-gcc' | 540 if os.path.exists("/usr/bin/arm-linux-gnueabihf-gcc"): |
|
binji
2014/01/22 22:33:47
shouldn't this just skip the arm build entirely in
Sam Clegg
2014/01/22 22:36:04
The current nacl gyp files require the arm cross c
| |
| 541 gyp_env['CXX'] = 'arm-linux-gnueabihf-g++' | 541 # TODO(sbc): make this conditional once all our linux |
| 542 gyp_env['AR'] = 'arm-linux-gnueabihf-ar' | 542 # have the ARM cross compiler installed. |
| 543 gyp_env['AS'] = 'arm-linux-gnueabihf-as' | 543 gyp_env['CC'] = 'arm-linux-gnueabihf-gcc' |
| 544 gyp_env['CC_host'] = 'cc' | 544 gyp_env['CXX'] = 'arm-linux-gnueabihf-g++' |
| 545 gyp_env['CXX_host'] = 'c++' | 545 gyp_env['AR'] = 'arm-linux-gnueabihf-ar' |
| 546 gyp_env['AS'] = 'arm-linux-gnueabihf-as' | |
| 547 gyp_env['CC_host'] = 'cc' | |
| 548 gyp_env['CXX_host'] = 'c++' | |
| 546 gyp_defines += ['armv7=1', 'arm_thumb=0', 'arm_neon=1', | 549 gyp_defines += ['armv7=1', 'arm_thumb=0', 'arm_neon=1', |
| 547 'arm_float_abi=hard'] | 550 'arm_float_abi=hard'] |
| 548 if force_arm_gcc: | 551 if force_arm_gcc: |
| 549 gyp_defines.append('nacl_enable_arm_gcc=1') | 552 gyp_defines.append('nacl_enable_arm_gcc=1') |
| 550 if getos.GetPlatform() == 'mac': | 553 if getos.GetPlatform() == 'mac': |
| 551 gyp_defines.append('clang=1') | 554 gyp_defines.append('clang=1') |
| 552 | 555 |
| 553 gyp_env['GYP_DEFINES'] = ' '.join(gyp_defines) | 556 gyp_env['GYP_DEFINES'] = ' '.join(gyp_defines) |
| 554 for key in ['GYP_GENERATORS', 'GYP_DEFINES', 'CC']: | 557 for key in ['GYP_GENERATORS', 'GYP_DEFINES', 'CC']: |
| 555 value = gyp_env.get(key) | 558 value = gyp_env.get(key) |
| (...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 992 BuildStepArchiveSDKTools() | 995 BuildStepArchiveSDKTools() |
| 993 | 996 |
| 994 return 0 | 997 return 0 |
| 995 | 998 |
| 996 | 999 |
| 997 if __name__ == '__main__': | 1000 if __name__ == '__main__': |
| 998 try: | 1001 try: |
| 999 sys.exit(main(sys.argv)) | 1002 sys.exit(main(sys.argv)) |
| 1000 except KeyboardInterrupt: | 1003 except KeyboardInterrupt: |
| 1001 buildbot_common.ErrorExit('build_sdk: interrupted') | 1004 buildbot_common.ErrorExit('build_sdk: interrupted') |
| OLD | NEW |