Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(543)

Side by Side Diff: native_client_sdk/src/build_tools/build_sdk.py

Issue 131853012: [NaCl SDK] Always set cross compiler with building arm components. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 if os.path.exists("/usr/bin/arm-linux-gnueabihf-gcc"): 540 gyp_env['CC'] = 'arm-linux-gnueabihf-gcc'
541 # TODO(sbc): make this conditional once all our linux 541 gyp_env['CXX'] = 'arm-linux-gnueabihf-g++'
542 # have the ARM cross compiler installed. 542 gyp_env['AR'] = 'arm-linux-gnueabihf-ar'
543 gyp_env['CC'] = 'arm-linux-gnueabihf-gcc' 543 gyp_env['AS'] = 'arm-linux-gnueabihf-as'
544 gyp_env['CXX'] = 'arm-linux-gnueabihf-g++' 544 gyp_env['CC_host'] = 'cc'
545 gyp_env['AR'] = 'arm-linux-gnueabihf-ar' 545 gyp_env['CXX_host'] = 'c++'
546 gyp_env['AS'] = 'arm-linux-gnueabihf-as'
547 gyp_env['CC_host'] = 'cc'
548 gyp_env['CXX_host'] = 'c++'
549 gyp_defines += ['armv7=1', 'arm_thumb=0', 'arm_neon=1', 546 gyp_defines += ['armv7=1', 'arm_thumb=0', 'arm_neon=1',
550 'arm_float_abi=hard'] 547 'arm_float_abi=hard']
551 if force_arm_gcc: 548 if force_arm_gcc:
552 gyp_defines.append('nacl_enable_arm_gcc=1') 549 gyp_defines.append('nacl_enable_arm_gcc=1')
553 if getos.GetPlatform() == 'mac': 550 if getos.GetPlatform() == 'mac':
554 gyp_defines.append('clang=1') 551 gyp_defines.append('clang=1')
555 552
556 gyp_env['GYP_DEFINES'] = ' '.join(gyp_defines) 553 gyp_env['GYP_DEFINES'] = ' '.join(gyp_defines)
557 for key in ['GYP_GENERATORS', 'GYP_DEFINES', 'CC']: 554 for key in ['GYP_GENERATORS', 'GYP_DEFINES', 'CC']:
558 value = gyp_env.get(key) 555 value = gyp_env.get(key)
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
995 BuildStepArchiveSDKTools() 992 BuildStepArchiveSDKTools()
996 993
997 return 0 994 return 0
998 995
999 996
1000 if __name__ == '__main__': 997 if __name__ == '__main__':
1001 try: 998 try:
1002 sys.exit(main(sys.argv)) 999 sys.exit(main(sys.argv))
1003 except KeyboardInterrupt: 1000 except KeyboardInterrupt:
1004 buildbot_common.ErrorExit('build_sdk: interrupted') 1001 buildbot_common.ErrorExit('build_sdk: interrupted')
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698