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 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
556 def NinjaBuild(targets, out_dir): | 564 def NinjaBuild(targets, out_dir): |
557 if type(targets) is not list: | 565 if type(targets) is not list: |
558 targets = [targets] | 566 targets = [targets] |
559 out_config_dir = os.path.join(out_dir, 'Release') | 567 out_config_dir = os.path.join(out_dir, 'Release') |
560 buildbot_common.Run(['ninja', '-C', out_config_dir] + targets, cwd=SRC_DIR) | 568 buildbot_common.Run(['ninja', '-C', out_config_dir] + targets, cwd=SRC_DIR) |
561 | 569 |
562 | 570 |
563 def BuildStepBuildToolchains(pepperdir, toolchains): | 571 def BuildStepBuildToolchains(pepperdir, toolchains): |
564 buildbot_common.BuildStep('SDK Items') | 572 buildbot_common.BuildStep('SDK Items') |
565 | 573 |
574 # Remove all gypbuild-* dirs. | |
575 buildbot_common.RemoveDir(os.path.join(OUT_DIR, GYPBUILD_DIR)) | |
576 buildbot_common.RemoveDir(os.path.join(OUT_DIR, GYPBUILD_DIR) + '-arm') | |
577 buildbot_common.RemoveDir(os.path.join(OUT_DIR, GYPBUILD_DIR) + '-64') | |
578 buildbot_common.RemoveDir(os.path.join(OUT_DIR, GYPBUILD_DIR) + '-pnacl-ia32') | |
579 buildbot_common.RemoveDir(os.path.join(OUT_DIR, GYPBUILD_DIR) + '-pnacl-arm') | |
Sam Clegg
2014/12/15 23:17:41
Why?
binji
2014/12/16 01:08:33
When I first rebuilt on Windows, the previous pdb
| |
580 | |
566 GypNinjaBuild_NaCl(GYPBUILD_DIR) | 581 GypNinjaBuild_NaCl(GYPBUILD_DIR) |
567 GypNinjaBuild_Breakpad(GYPBUILD_DIR) | 582 GypNinjaBuild_Breakpad(GYPBUILD_DIR) |
568 | 583 |
569 platform = getos.GetPlatform() | 584 platform = getos.GetPlatform() |
570 newlibdir = os.path.join(pepperdir, 'toolchain', platform + '_x86_newlib') | 585 newlibdir = os.path.join(pepperdir, 'toolchain', platform + '_x86_newlib') |
571 glibcdir = os.path.join(pepperdir, 'toolchain', platform + '_x86_glibc') | 586 glibcdir = os.path.join(pepperdir, 'toolchain', platform + '_x86_glibc') |
572 armdir = os.path.join(pepperdir, 'toolchain', platform + '_arm_newlib') | 587 armdir = os.path.join(pepperdir, 'toolchain', platform + '_arm_newlib') |
573 pnacldir = os.path.join(pepperdir, 'toolchain', platform + '_pnacl') | 588 pnacldir = os.path.join(pepperdir, 'toolchain', platform + '_pnacl') |
574 bionicdir = os.path.join(pepperdir, 'toolchain', platform + '_arm_bionic') | 589 bionicdir = os.path.join(pepperdir, 'toolchain', platform + '_arm_bionic') |
575 | 590 |
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1064 BuildStepArchiveSDKTools() | 1079 BuildStepArchiveSDKTools() |
1065 | 1080 |
1066 return 0 | 1081 return 0 |
1067 | 1082 |
1068 | 1083 |
1069 if __name__ == '__main__': | 1084 if __name__ == '__main__': |
1070 try: | 1085 try: |
1071 sys.exit(main(sys.argv[1:])) | 1086 sys.exit(main(sys.argv[1:])) |
1072 except KeyboardInterrupt: | 1087 except KeyboardInterrupt: |
1073 buildbot_common.ErrorExit('build_sdk: interrupted') | 1088 buildbot_common.ErrorExit('build_sdk: interrupted') |
OLD | NEW |