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 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 ['irt_core_newlib_arm.nexe', 'irt_core_arm.nexe'], | 441 ['irt_core_newlib_arm.nexe', 'irt_core_arm.nexe'], |
442 ['irt_core_newlib_arm.nexe', 'irt_core_arm.nexe'], | 442 ['irt_core_newlib_arm.nexe', 'irt_core_arm.nexe'], |
443 ['nacl_helper_bootstrap', 'nacl_helper_bootstrap_arm'], | 443 ['nacl_helper_bootstrap', 'nacl_helper_bootstrap_arm'], |
444 ['nonsfi_loader_newlib_arm_nonsfi.nexe', 'nonsfi_loader_arm'], | 444 ['nonsfi_loader_newlib_arm_nonsfi.nexe', 'nonsfi_loader_arm'], |
445 ['sel_ldr', 'sel_ldr_arm'] | 445 ['sel_ldr', 'sel_ldr_arm'] |
446 ] | 446 ] |
447 InstallFiles(GetNinjaOutDir('arm'), tools_dir, arm_files) | 447 InstallFiles(GetNinjaOutDir('arm'), tools_dir, arm_files) |
448 | 448 |
449 for tc in set(toolchains) & set(['newlib', 'glibc', 'pnacl']): | 449 for tc in set(toolchains) & set(['newlib', 'glibc', 'pnacl']): |
450 if tc == 'pnacl': | 450 if tc == 'pnacl': |
451 xarches = (None, 'ia32', 'x64') | 451 xarches = (None, 'ia32', 'x64', 'arm') |
452 elif tc == 'glibc': | 452 elif tc == 'glibc': |
453 xarches = ('ia32', 'x64') | 453 xarches = ('ia32', 'x64') |
454 else: | 454 else: |
455 xarches = ('arm', 'ia32', 'x64') | 455 xarches = ('arm', 'ia32', 'x64') |
456 | 456 |
457 for xarch in xarches: | 457 for xarch in xarches: |
458 src_dir = GetGypBuiltLib(tc, xarch) | 458 src_dir = GetGypBuiltLib(tc, xarch) |
459 dst_dir = GetOutputToolchainLib(pepperdir, tc, xarch) | 459 dst_dir = GetOutputToolchainLib(pepperdir, tc, xarch) |
460 InstallFiles(src_dir, dst_dir, TOOLCHAIN_LIBS[tc]) | 460 InstallFiles(src_dir, dst_dir, TOOLCHAIN_LIBS[tc]) |
461 | 461 |
(...skipping 14 matching lines...) Expand all Loading... |
476 # gyp_py = os.path.join(NACL_DIR, 'build', 'gyp_nacl') | 476 # gyp_py = os.path.join(NACL_DIR, 'build', 'gyp_nacl') |
477 gyp_py = os.path.join(SRC_DIR, 'build', 'gyp_chromium') | 477 gyp_py = os.path.join(SRC_DIR, 'build', 'gyp_chromium') |
478 nacl_core_sdk_gyp = os.path.join(NACL_DIR, 'build', 'nacl_core_sdk.gyp') | 478 nacl_core_sdk_gyp = os.path.join(NACL_DIR, 'build', 'nacl_core_sdk.gyp') |
479 all_gyp = os.path.join(NACL_DIR, 'build', 'all.gyp') | 479 all_gyp = os.path.join(NACL_DIR, 'build', 'all.gyp') |
480 | 480 |
481 out_dir_32 = MakeNinjaRelPath(rel_out_dir + '-ia32') | 481 out_dir_32 = MakeNinjaRelPath(rel_out_dir + '-ia32') |
482 out_dir_64 = MakeNinjaRelPath(rel_out_dir + '-x64') | 482 out_dir_64 = MakeNinjaRelPath(rel_out_dir + '-x64') |
483 out_dir_arm = MakeNinjaRelPath(rel_out_dir + '-arm') | 483 out_dir_arm = MakeNinjaRelPath(rel_out_dir + '-arm') |
484 out_dir_clang_32 = MakeNinjaRelPath(rel_out_dir + '-clang-ia32') | 484 out_dir_clang_32 = MakeNinjaRelPath(rel_out_dir + '-clang-ia32') |
485 out_dir_clang_64 = MakeNinjaRelPath(rel_out_dir + '-clang-x64') | 485 out_dir_clang_64 = MakeNinjaRelPath(rel_out_dir + '-clang-x64') |
| 486 out_dir_clang_arm = MakeNinjaRelPath(rel_out_dir + '-clang-arm') |
486 | 487 |
487 GypNinjaBuild('ia32', gyp_py, nacl_core_sdk_gyp, 'nacl_core_sdk', out_dir_32) | 488 GypNinjaBuild('ia32', gyp_py, nacl_core_sdk_gyp, 'nacl_core_sdk', out_dir_32) |
488 GypNinjaBuild('x64', gyp_py, nacl_core_sdk_gyp, 'nacl_core_sdk', out_dir_64) | 489 GypNinjaBuild('x64', gyp_py, nacl_core_sdk_gyp, 'nacl_core_sdk', out_dir_64) |
| 490 GypNinjaBuild('arm', gyp_py, nacl_core_sdk_gyp, 'nacl_core_sdk', out_dir_arm) |
489 GypNinjaBuild('ia32', gyp_py, nacl_core_sdk_gyp, 'nacl_core_sdk', | 491 GypNinjaBuild('ia32', gyp_py, nacl_core_sdk_gyp, 'nacl_core_sdk', |
490 out_dir_clang_32, gyp_defines=['use_nacl_clang=1']) | 492 out_dir_clang_32, gyp_defines=['use_nacl_clang=1']) |
491 GypNinjaBuild('x64', gyp_py, nacl_core_sdk_gyp, 'nacl_core_sdk', | 493 GypNinjaBuild('x64', gyp_py, nacl_core_sdk_gyp, 'nacl_core_sdk', |
492 out_dir_clang_64, gyp_defines=['use_nacl_clang=1']) | 494 out_dir_clang_64, gyp_defines=['use_nacl_clang=1']) |
493 GypNinjaBuild('arm', gyp_py, nacl_core_sdk_gyp, 'nacl_core_sdk', out_dir_arm) | 495 GypNinjaBuild('arm', gyp_py, nacl_core_sdk_gyp, 'nacl_core_sdk', |
| 496 out_dir_clang_arm, gyp_defines=['use_nacl_clang=1']) |
494 GypNinjaBuild('x64', gyp_py, all_gyp, 'ncval_new', out_dir_64) | 497 GypNinjaBuild('x64', gyp_py, all_gyp, 'ncval_new', out_dir_64) |
495 | 498 |
496 | 499 |
497 def GypNinjaBuild_Breakpad(rel_out_dir): | 500 def GypNinjaBuild_Breakpad(rel_out_dir): |
498 # TODO(binji): dump_syms doesn't currently build on Windows. See | 501 # TODO(binji): dump_syms doesn't currently build on Windows. See |
499 # http://crbug.com/245456 | 502 # http://crbug.com/245456 |
500 if getos.GetPlatform() == 'win': | 503 if getos.GetPlatform() == 'win': |
501 return | 504 return |
502 | 505 |
503 gyp_py = os.path.join(SRC_DIR, 'build', 'gyp_chromium') | 506 gyp_py = os.path.join(SRC_DIR, 'build', 'gyp_chromium') |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
589 GypNinjaBuild_PPAPI('x64', GYPBUILD_DIR + '-x64') | 592 GypNinjaBuild_PPAPI('x64', GYPBUILD_DIR + '-x64') |
590 | 593 |
591 if 'arm' in toolchains: | 594 if 'arm' in toolchains: |
592 GypNinjaBuild_PPAPI('arm', GYPBUILD_DIR + '-arm') | 595 GypNinjaBuild_PPAPI('arm', GYPBUILD_DIR + '-arm') |
593 | 596 |
594 if 'pnacl' in toolchains: | 597 if 'pnacl' in toolchains: |
595 GypNinjaBuild_PPAPI('ia32', GYPBUILD_DIR + '-clang-ia32', | 598 GypNinjaBuild_PPAPI('ia32', GYPBUILD_DIR + '-clang-ia32', |
596 ['use_nacl_clang=1']) | 599 ['use_nacl_clang=1']) |
597 GypNinjaBuild_PPAPI('x64', GYPBUILD_DIR + '-clang-x64', | 600 GypNinjaBuild_PPAPI('x64', GYPBUILD_DIR + '-clang-x64', |
598 ['use_nacl_clang=1']) | 601 ['use_nacl_clang=1']) |
| 602 GypNinjaBuild_PPAPI('arm', GYPBUILD_DIR + '-clang-arm', |
| 603 ['use_nacl_clang=1']) |
599 | 604 |
600 # NOTE: For ia32, gyp builds both x86-32 and x86-64 by default. | 605 # NOTE: For ia32, gyp builds both x86-32 and x86-64 by default. |
601 for arch in ('ia32', 'arm'): | 606 for arch in ('ia32', 'arm'): |
602 # Fill in the latest native pnacl shim library from the chrome build. | 607 # Fill in the latest native pnacl shim library from the chrome build. |
603 build_dir = GYPBUILD_DIR + '-pnacl-' + arch | 608 build_dir = GYPBUILD_DIR + '-pnacl-' + arch |
604 GypNinjaBuild_Pnacl(build_dir, arch) | 609 GypNinjaBuild_Pnacl(build_dir, arch) |
605 | 610 |
606 GypNinjaInstall(pepperdir, toolchains) | 611 GypNinjaInstall(pepperdir, toolchains) |
607 | 612 |
608 platform = getos.GetPlatform() | 613 platform = getos.GetPlatform() |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
651 pnacl_translator_lib_dir) | 656 pnacl_translator_lib_dir) |
652 | 657 |
653 buildbot_common.CopyFile( | 658 buildbot_common.CopyFile( |
654 os.path.join(release_build_dir, 'libpnacl_irt_shim.a'), | 659 os.path.join(release_build_dir, 'libpnacl_irt_shim.a'), |
655 pnacl_translator_lib_dir) | 660 pnacl_translator_lib_dir) |
656 | 661 |
657 InstallNaClHeaders(GetToolchainNaClInclude('pnacl', pnacldir, 'pnacl'), | 662 InstallNaClHeaders(GetToolchainNaClInclude('pnacl', pnacldir, 'pnacl'), |
658 'pnacl') | 663 'pnacl') |
659 InstallNaClHeaders(GetToolchainNaClInclude('pnacl', pnacldir, 'x86'), | 664 InstallNaClHeaders(GetToolchainNaClInclude('pnacl', pnacldir, 'x86'), |
660 'pnacl') | 665 'pnacl') |
| 666 InstallNaClHeaders(GetToolchainNaClInclude('pnacl', pnacldir, 'arm'), |
| 667 'pnacl') |
661 | 668 |
662 | 669 |
663 def MakeDirectoryOrClobber(pepperdir, dirname, clobber): | 670 def MakeDirectoryOrClobber(pepperdir, dirname, clobber): |
664 dirpath = os.path.join(pepperdir, dirname) | 671 dirpath = os.path.join(pepperdir, dirname) |
665 if clobber: | 672 if clobber: |
666 buildbot_common.RemoveDir(dirpath) | 673 buildbot_common.RemoveDir(dirpath) |
667 buildbot_common.MakeDir(dirpath) | 674 buildbot_common.MakeDir(dirpath) |
668 | 675 |
669 return dirpath | 676 return dirpath |
670 | 677 |
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1099 BuildStepArchiveSDKTools() | 1106 BuildStepArchiveSDKTools() |
1100 | 1107 |
1101 return 0 | 1108 return 0 |
1102 | 1109 |
1103 | 1110 |
1104 if __name__ == '__main__': | 1111 if __name__ == '__main__': |
1105 try: | 1112 try: |
1106 sys.exit(main(sys.argv[1:])) | 1113 sys.exit(main(sys.argv[1:])) |
1107 except KeyboardInterrupt: | 1114 except KeyboardInterrupt: |
1108 buildbot_common.ErrorExit('build_sdk: interrupted') | 1115 buildbot_common.ErrorExit('build_sdk: interrupted') |
OLD | NEW |