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

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

Issue 811533002: [NaCl SDK] Update Windows build to use vs2013 from depot_tools. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge master Created 5 years, 11 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
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 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 if tc == 'newlib' and xarch == 'arm' and 'bionic' in toolchains: 442 if tc == 'newlib' and xarch == 'arm' and 'bionic' in toolchains:
443 bionic_dir = GetOutputToolchainLib(pepperdir, 'bionic', xarch) 443 bionic_dir = GetOutputToolchainLib(pepperdir, 'bionic', xarch)
444 InstallFiles(src_dir, bionic_dir, TOOLCHAIN_LIBS['bionic']) 444 InstallFiles(src_dir, bionic_dir, TOOLCHAIN_LIBS['bionic'])
445 445
446 if tc != 'pnacl': 446 if tc != 'pnacl':
447 src_dir = GetGypToolchainLib(tc, xarch) 447 src_dir = GetGypToolchainLib(tc, xarch)
448 InstallFiles(src_dir, dst_dir, ['crt1.o']) 448 InstallFiles(src_dir, dst_dir, ['crt1.o'])
449 449
450 450
451 def GypNinjaBuild_NaCl(rel_out_dir): 451 def GypNinjaBuild_NaCl(rel_out_dir):
452 gyp_py = os.path.join(NACL_DIR, 'build', 'gyp_nacl') 452 # TODO(binji): gyp_nacl doesn't build properly on Windows anymore; it only
453 # can use VS2010, not VS2013 which is now required by the Chromium repo. NaCl
454 # needs to be updated to perform the same logic as Chromium in detecting VS,
455 # which can now exist in the depot_tools directory.
456 # See https://code.google.com/p/nativeclient/issues/detail?id=4022
457 #
458 # For now, let's use gyp_chromium to build these components.
459 # gyp_py = os.path.join(NACL_DIR, 'build', 'gyp_nacl')
460 gyp_py = os.path.join(SRC_DIR, 'build', 'gyp_chromium')
453 nacl_core_sdk_gyp = os.path.join(NACL_DIR, 'build', 'nacl_core_sdk.gyp') 461 nacl_core_sdk_gyp = os.path.join(NACL_DIR, 'build', 'nacl_core_sdk.gyp')
454 all_gyp = os.path.join(NACL_DIR, 'build', 'all.gyp') 462 all_gyp = os.path.join(NACL_DIR, 'build', 'all.gyp')
455 463
456 out_dir = MakeNinjaRelPath(rel_out_dir) 464 out_dir = MakeNinjaRelPath(rel_out_dir)
457 out_dir_arm = MakeNinjaRelPath(rel_out_dir + '-arm') 465 out_dir_arm = MakeNinjaRelPath(rel_out_dir + '-arm')
458 GypNinjaBuild('ia32', gyp_py, nacl_core_sdk_gyp, 'nacl_core_sdk', out_dir) 466 GypNinjaBuild('ia32', gyp_py, nacl_core_sdk_gyp, 'nacl_core_sdk', out_dir)
459 GypNinjaBuild('arm', gyp_py, nacl_core_sdk_gyp, 'nacl_core_sdk', out_dir_arm) 467 GypNinjaBuild('arm', gyp_py, nacl_core_sdk_gyp, 'nacl_core_sdk', out_dir_arm)
460 GypNinjaBuild(None, gyp_py, all_gyp, 'ncval_new', out_dir) 468 GypNinjaBuild(None, gyp_py, all_gyp, 'ncval_new', out_dir)
461 469
462 platform = getos.GetPlatform() 470 platform = getos.GetPlatform()
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 def GypNinjaBuild_Pnacl(rel_out_dir, target_arch): 510 def GypNinjaBuild_Pnacl(rel_out_dir, target_arch):
503 # TODO(binji): This will build the pnacl_irt_shim twice; once as part of the 511 # TODO(binji): This will build the pnacl_irt_shim twice; once as part of the
504 # Chromium build, and once here. When we move more of the SDK build process 512 # Chromium build, and once here. When we move more of the SDK build process
505 # to gyp, we can remove this. 513 # to gyp, we can remove this.
506 gyp_py = os.path.join(SRC_DIR, 'build', 'gyp_chromium') 514 gyp_py = os.path.join(SRC_DIR, 'build', 'gyp_chromium')
507 515
508 out_dir = MakeNinjaRelPath(rel_out_dir) 516 out_dir = MakeNinjaRelPath(rel_out_dir)
509 gyp_file = os.path.join(SRC_DIR, 'ppapi', 'native_client', 'src', 517 gyp_file = os.path.join(SRC_DIR, 'ppapi', 'native_client', 'src',
510 'untrusted', 'pnacl_irt_shim', 'pnacl_irt_shim.gyp') 518 'untrusted', 'pnacl_irt_shim', 'pnacl_irt_shim.gyp')
511 targets = ['aot'] 519 targets = ['aot']
512 GypNinjaBuild(target_arch, gyp_py, gyp_file, targets, out_dir, False) 520 GypNinjaBuild(target_arch, gyp_py, gyp_file, targets, out_dir)
513 521
514 522
515 def GypNinjaBuild(arch, gyp_py_script, gyp_file, targets, 523 def GypNinjaBuild(arch, gyp_py_script, gyp_file, targets, out_dir):
516 out_dir, force_arm_gcc=True):
517 gyp_env = dict(os.environ) 524 gyp_env = dict(os.environ)
518 gyp_env['GYP_GENERATORS'] = 'ninja' 525 gyp_env['GYP_GENERATORS'] = 'ninja'
519 gyp_defines = [] 526 gyp_defines = []
520 if options.mac_sdk: 527 if options.mac_sdk:
521 gyp_defines.append('mac_sdk=%s' % options.mac_sdk) 528 gyp_defines.append('mac_sdk=%s' % options.mac_sdk)
522 if arch is not None: 529 if arch is not None:
523 gyp_defines.append('target_arch=%s' % arch) 530 gyp_defines.append('target_arch=%s' % arch)
524 if arch == 'arm': 531 if arch == 'arm':
525 if getos.GetPlatform() == 'linux': 532 gyp_env['GYP_CROSSCOMPILE'] = '1'
526 gyp_env['CC'] = 'arm-linux-gnueabihf-gcc' 533 gyp_defines += ['arm_float_abi=hard']
527 gyp_env['CXX'] = 'arm-linux-gnueabihf-g++'
528 gyp_env['AR'] = 'arm-linux-gnueabihf-ar'
529 gyp_env['AS'] = 'arm-linux-gnueabihf-as'
530 gyp_env['CC_host'] = 'cc'
531 gyp_env['CXX_host'] = 'c++'
532 gyp_defines += ['clang=0', 'host_clang=0']
533 gyp_defines += ['armv7=1', 'arm_thumb=0', 'arm_neon=1',
534 'arm_float_abi=hard']
535 if force_arm_gcc:
536 gyp_defines.append('nacl_enable_arm_gcc=1')
537 if options.no_arm_trusted: 534 if options.no_arm_trusted:
538 gyp_defines.append('disable_cross_trusted=1') 535 gyp_defines.append('disable_cross_trusted=1')
539 if getos.GetPlatform() == 'mac': 536 if getos.GetPlatform() == 'mac':
540 gyp_defines.append('clang=1') 537 gyp_defines.append('clang=1')
541 538
542 gyp_env['GYP_DEFINES'] = ' '.join(gyp_defines) 539 gyp_env['GYP_DEFINES'] = ' '.join(gyp_defines)
543 for key in ['GYP_GENERATORS', 'GYP_DEFINES', 'CC']: 540 for key in ['GYP_GENERATORS', 'GYP_DEFINES', 'CC']:
544 value = gyp_env.get(key) 541 value = gyp_env.get(key)
545 if value is not None: 542 if value is not None:
546 print '%s="%s"' % (key, value) 543 print '%s="%s"' % (key, value)
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
1070 BuildStepArchiveSDKTools() 1067 BuildStepArchiveSDKTools()
1071 1068
1072 return 0 1069 return 0
1073 1070
1074 1071
1075 if __name__ == '__main__': 1072 if __name__ == '__main__':
1076 try: 1073 try:
1077 sys.exit(main(sys.argv[1:])) 1074 sys.exit(main(sys.argv[1:]))
1078 except KeyboardInterrupt: 1075 except KeyboardInterrupt:
1079 buildbot_common.ErrorExit('build_sdk: interrupted') 1076 buildbot_common.ErrorExit('build_sdk: interrupted')
OLDNEW
« no previous file with comments | « native_client_sdk/src/build_tools/build_artifacts.py ('k') | native_client_sdk/src/build_tools/buildbot_common.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698