| 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 TOOLCHAIN_PACKAGE_MAP[toolchain][0]) | 131 TOOLCHAIN_PACKAGE_MAP[toolchain][0]) |
| 132 return GetToolchainNaClLib(tcname, tcpath, xarch) | 132 return GetToolchainNaClLib(tcname, tcpath, xarch) |
| 133 | 133 |
| 134 | 134 |
| 135 def GetOutputToolchainLib(pepperdir, tcname, xarch): | 135 def GetOutputToolchainLib(pepperdir, tcname, xarch): |
| 136 tcpath = os.path.join(pepperdir, 'toolchain', | 136 tcpath = os.path.join(pepperdir, 'toolchain', |
| 137 GetToolchainDirName(tcname, xarch)) | 137 GetToolchainDirName(tcname, xarch)) |
| 138 return GetToolchainNaClLib(tcname, tcpath, xarch) | 138 return GetToolchainNaClLib(tcname, tcpath, xarch) |
| 139 | 139 |
| 140 | 140 |
| 141 def GetPNaClNativeLib(tcpath, arch): | 141 def GetPNaClTranslatorLib(tcpath, arch): |
| 142 if arch not in ['arm', 'x86-32', 'x86-64']: | 142 if arch not in ['arm', 'x86-32', 'x86-64']: |
| 143 buildbot_common.ErrorExit('Unknown architecture %s.' % arch) | 143 buildbot_common.ErrorExit('Unknown architecture %s.' % arch) |
| 144 return os.path.join(tcpath, 'lib-' + arch) | 144 return os.path.join(tcpath, 'translator', arch, 'lib') |
| 145 | 145 |
| 146 | 146 |
| 147 def BuildStepDownloadToolchains(toolchains): | 147 def BuildStepDownloadToolchains(toolchains): |
| 148 buildbot_common.BuildStep('Running package_version.py') | 148 buildbot_common.BuildStep('Running package_version.py') |
| 149 args = [sys.executable, PKGVER, '--exclude', 'arm_trusted'] | 149 args = [sys.executable, PKGVER, '--exclude', 'arm_trusted'] |
| 150 if 'bionic' in toolchains: | 150 if 'bionic' in toolchains: |
| 151 build_platform = '%s_x86' % getos.GetPlatform() | 151 build_platform = '%s_x86' % getos.GetPlatform() |
| 152 args.extend(['--append', os.path.join(build_platform, 'nacl_arm_bionic')]) | 152 args.extend(['--append', os.path.join(build_platform, 'nacl_arm_bionic')]) |
| 153 args.append('sync') | 153 args.append('sync') |
| 154 buildbot_common.Run(args, cwd=NACL_DIR) | 154 buildbot_common.Run(args, cwd=NACL_DIR) |
| (...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 nacl_arches = ['x86-32', 'x86-64'] | 605 nacl_arches = ['x86-32', 'x86-64'] |
| 606 elif arch == 'arm': | 606 elif arch == 'arm': |
| 607 nacl_arches = ['arm'] | 607 nacl_arches = ['arm'] |
| 608 else: | 608 else: |
| 609 buildbot_common.ErrorExit('Unknown architecture: %s' % arch) | 609 buildbot_common.ErrorExit('Unknown architecture: %s' % arch) |
| 610 for nacl_arch in nacl_arches: | 610 for nacl_arch in nacl_arches: |
| 611 release_build_dir = os.path.join(OUT_DIR, build_dir, 'Release', | 611 release_build_dir = os.path.join(OUT_DIR, build_dir, 'Release', |
| 612 'gen', 'tc_pnacl_translate', | 612 'gen', 'tc_pnacl_translate', |
| 613 'lib-' + nacl_arch) | 613 'lib-' + nacl_arch) |
| 614 | 614 |
| 615 pnacl_translator_lib_dir = GetPNaClTranslatorLib(pnacldir, nacl_arch) |
| 616 if not os.path.isdir(pnacl_translator_lib_dir): |
| 617 buildbot_common.ErrorExit('Expected %s directory to exist.' % |
| 618 pnacl_translator_lib_dir) |
| 619 |
| 615 buildbot_common.CopyFile( | 620 buildbot_common.CopyFile( |
| 616 os.path.join(release_build_dir, 'libpnacl_irt_shim.a'), | 621 os.path.join(release_build_dir, 'libpnacl_irt_shim.a'), |
| 617 GetPNaClNativeLib(pnacldir, nacl_arch)) | 622 pnacl_translator_lib_dir) |
| 618 | 623 |
| 619 InstallNaClHeaders(GetToolchainNaClInclude('pnacl', pnacldir, 'x86'), | 624 InstallNaClHeaders(GetToolchainNaClInclude('pnacl', pnacldir, 'x86'), |
| 620 'newlib') | 625 'newlib') |
| 621 | 626 |
| 622 | 627 |
| 623 def MakeDirectoryOrClobber(pepperdir, dirname, clobber): | 628 def MakeDirectoryOrClobber(pepperdir, dirname, clobber): |
| 624 dirpath = os.path.join(pepperdir, dirname) | 629 dirpath = os.path.join(pepperdir, dirname) |
| 625 if clobber: | 630 if clobber: |
| 626 buildbot_common.RemoveDir(dirpath) | 631 buildbot_common.RemoveDir(dirpath) |
| 627 buildbot_common.MakeDir(dirpath) | 632 buildbot_common.MakeDir(dirpath) |
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1055 BuildStepArchiveSDKTools() | 1060 BuildStepArchiveSDKTools() |
| 1056 | 1061 |
| 1057 return 0 | 1062 return 0 |
| 1058 | 1063 |
| 1059 | 1064 |
| 1060 if __name__ == '__main__': | 1065 if __name__ == '__main__': |
| 1061 try: | 1066 try: |
| 1062 sys.exit(main(sys.argv)) | 1067 sys.exit(main(sys.argv)) |
| 1063 except KeyboardInterrupt: | 1068 except KeyboardInterrupt: |
| 1064 buildbot_common.ErrorExit('build_sdk: interrupted') | 1069 buildbot_common.ErrorExit('build_sdk: interrupted') |
| OLD | NEW |