| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 'bionic': ('nacl_arm_bionic', '%(platform)s_arm_bionic'), | 69 'bionic': ('nacl_arm_bionic', '%(platform)s_arm_bionic'), |
| 70 'arm': ('nacl_arm_newlib', '%(platform)s_arm_newlib'), | 70 'arm': ('nacl_arm_newlib', '%(platform)s_arm_newlib'), |
| 71 'glibc': ('nacl_x86_glibc', '%(platform)s_x86_glibc'), | 71 'glibc': ('nacl_x86_glibc', '%(platform)s_x86_glibc'), |
| 72 'pnacl': ('pnacl_newlib', '%(platform)s_pnacl') | 72 'pnacl': ('pnacl_newlib', '%(platform)s_pnacl') |
| 73 } | 73 } |
| 74 | 74 |
| 75 | 75 |
| 76 def GetToolchainNaClInclude(tcname, tcpath, arch): | 76 def GetToolchainNaClInclude(tcname, tcpath, arch): |
| 77 if arch == 'x86': | 77 if arch == 'x86': |
| 78 if tcname == 'pnacl': | 78 if tcname == 'pnacl': |
| 79 return os.path.join(tcpath, 'sdk', 'include') | 79 return os.path.join(tcpath, 'le32-nacl', 'include') |
| 80 return os.path.join(tcpath, 'x86_64-nacl', 'include') | 80 return os.path.join(tcpath, 'x86_64-nacl', 'include') |
| 81 elif arch == 'arm': | 81 elif arch == 'arm': |
| 82 return os.path.join(tcpath, 'arm-nacl', 'include') | 82 return os.path.join(tcpath, 'arm-nacl', 'include') |
| 83 else: | 83 else: |
| 84 buildbot_common.ErrorExit('Unknown architecture: %s' % arch) | 84 buildbot_common.ErrorExit('Unknown architecture: %s' % arch) |
| 85 | 85 |
| 86 | 86 |
| 87 def GetGypGenDir(xarch): | 87 def GetGypGenDir(xarch): |
| 88 if xarch == 'arm': | 88 if xarch == 'arm': |
| 89 build_dir = GYPBUILD_DIR + '-arm' | 89 build_dir = GYPBUILD_DIR + '-arm' |
| 90 else: | 90 else: |
| 91 build_dir = GYPBUILD_DIR | 91 build_dir = GYPBUILD_DIR |
| 92 return os.path.join(OUT_DIR, build_dir, 'Release', 'gen') | 92 return os.path.join(OUT_DIR, build_dir, 'Release', 'gen') |
| 93 | 93 |
| 94 | 94 |
| 95 def GetGypBuiltLib(tcname, xarch=None): | 95 def GetGypBuiltLib(tcname, xarch=None): |
| 96 if tcname == 'pnacl': | 96 if tcname == 'pnacl': |
| 97 tcname = 'pnacl_newlib' | 97 tcname = 'pnacl_newlib' |
| 98 if not xarch: | 98 if not xarch: |
| 99 xarch = '' | 99 xarch = '' |
| 100 return os.path.join(GetGypGenDir(xarch), 'tc_' + tcname, 'lib' + xarch) | 100 return os.path.join(GetGypGenDir(xarch), 'tc_' + tcname, 'lib' + xarch) |
| 101 | 101 |
| 102 | 102 |
| 103 def GetToolchainNaClLib(tcname, tcpath, xarch): | 103 def GetToolchainNaClLib(tcname, tcpath, xarch): |
| 104 if tcname == 'pnacl': | 104 if tcname == 'pnacl': |
| 105 return os.path.join(tcpath, 'sdk', 'lib') | 105 return os.path.join(tcpath, 'le32-nacl', 'lib') |
| 106 elif xarch == '32': | 106 elif xarch == '32': |
| 107 return os.path.join(tcpath, 'x86_64-nacl', 'lib32') | 107 return os.path.join(tcpath, 'x86_64-nacl', 'lib32') |
| 108 elif xarch == '64': | 108 elif xarch == '64': |
| 109 return os.path.join(tcpath, 'x86_64-nacl', 'lib') | 109 return os.path.join(tcpath, 'x86_64-nacl', 'lib') |
| 110 elif xarch == 'arm': | 110 elif xarch == 'arm': |
| 111 return os.path.join(tcpath, 'arm-nacl', 'lib') | 111 return os.path.join(tcpath, 'arm-nacl', 'lib') |
| 112 | 112 |
| 113 | 113 |
| 114 def GetToolchainDirName(tcname, xarch): | 114 def GetToolchainDirName(tcname, xarch): |
| 115 if tcname == 'pnacl': | 115 if tcname == 'pnacl': |
| (...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1045 BuildStepArchiveSDKTools() | 1045 BuildStepArchiveSDKTools() |
| 1046 | 1046 |
| 1047 return 0 | 1047 return 0 |
| 1048 | 1048 |
| 1049 | 1049 |
| 1050 if __name__ == '__main__': | 1050 if __name__ == '__main__': |
| 1051 try: | 1051 try: |
| 1052 sys.exit(main(sys.argv)) | 1052 sys.exit(main(sys.argv)) |
| 1053 except KeyboardInterrupt: | 1053 except KeyboardInterrupt: |
| 1054 buildbot_common.ErrorExit('build_sdk: interrupted') | 1054 buildbot_common.ErrorExit('build_sdk: interrupted') |
| OLD | NEW |