OLD | NEW |
---|---|
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2013 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2013 The Native Client 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 """Recipes for PNaCl toolchain packages. | 6 """Recipes for PNaCl toolchain packages. |
7 | 7 |
8 Recipes consist of specially-structured dictionaries, with keys for package | 8 Recipes consist of specially-structured dictionaries, with keys for package |
9 name, type, commands to execute, etc. The structure is documented in the | 9 name, type, commands to execute, etc. The structure is documented in the |
10 PackageBuilder docstring in toolchain_main.py. | 10 PackageBuilder docstring in toolchain_main.py. |
(...skipping 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1140 'binutils_x86_%s' % legal_triple, | 1140 'binutils_x86_%s' % legal_triple, |
1141 'llvm_%s' % legal_triple, | 1141 'llvm_%s' % legal_triple, |
1142 'driver_%s' % legal_triple]) | 1142 'driver_%s' % legal_triple]) |
1143 if os_name != 'win': | 1143 if os_name != 'win': |
1144 host_packages[os_name].append('libcxx_%s' % legal_triple) | 1144 host_packages[os_name].append('libcxx_%s' % legal_triple) |
1145 | 1145 |
1146 # Unsandboxed target IRT libraries | 1146 # Unsandboxed target IRT libraries |
1147 for os_name in ('linux', 'mac'): | 1147 for os_name in ('linux', 'mac'): |
1148 legal_triple = pynacl.gsd_storage.LegalizeName('x86-32-' + os_name) | 1148 legal_triple = pynacl.gsd_storage.LegalizeName('x86-32-' + os_name) |
1149 host_packages[os_name].append('unsandboxed_runtime_%s' % legal_triple) | 1149 host_packages[os_name].append('unsandboxed_runtime_%s' % legal_triple) |
1150 for os_name in ['linux']: | |
Jim Stichnoth
2015/10/15 23:31:41
Use ('linux') like syntax above?
John
2015/10/31 17:22:23
Because python, ('linux') means something else:
Jim Stichnoth
2015/10/31 17:41:31
How about making them both of the form:
for os_
John
2015/10/31 19:06:42
Done.
| |
1151 legal_triple = pynacl.gsd_storage.LegalizeName('arm-' + os_name) | |
1152 host_packages[os_name].append('unsandboxed_runtime_%s' % legal_triple) | |
1150 | 1153 |
1151 for os_name, os_packages in host_packages.iteritems(): | 1154 for os_name, os_packages in host_packages.iteritems(): |
1152 package_target = '%s_x86' % pynacl.platform.GetOS(os_name) | 1155 package_target = '%s_x86' % pynacl.platform.GetOS(os_name) |
1153 package_targets[package_target] = {} | 1156 package_targets[package_target] = {} |
1154 | 1157 |
1155 raw_packages = os_packages + common_raw_packages | 1158 raw_packages = os_packages + common_raw_packages |
1156 package_targets[package_target]['pnacl_newlib_raw'] = raw_packages | 1159 package_targets[package_target]['pnacl_newlib_raw'] = raw_packages |
1157 | 1160 |
1158 complete_packages = raw_packages + common_complete_packages | 1161 complete_packages = raw_packages + common_complete_packages |
1159 package_targets[package_target]['pnacl_newlib'] = complete_packages | 1162 package_targets[package_target]['pnacl_newlib'] = complete_packages |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1272 for arch in TRANSLATOR_ARCHES: | 1275 for arch in TRANSLATOR_ARCHES: |
1273 packages.update(pnacl_targetlibs.TranslatorLibs(arch, is_canonical, | 1276 packages.update(pnacl_targetlibs.TranslatorLibs(arch, is_canonical, |
1274 args.no_nacl_gcc)) | 1277 args.no_nacl_gcc)) |
1275 packages.update(Metadata(rev, is_canonical)) | 1278 packages.update(Metadata(rev, is_canonical)) |
1276 packages.update(pnacl_targetlibs.SDKCompiler( | 1279 packages.update(pnacl_targetlibs.SDKCompiler( |
1277 ['le32'] + DIRECT_TO_NACL_ARCHES)) | 1280 ['le32'] + DIRECT_TO_NACL_ARCHES)) |
1278 packages.update(pnacl_targetlibs.SDKLibs('le32', is_canonical)) | 1281 packages.update(pnacl_targetlibs.SDKLibs('le32', is_canonical)) |
1279 unsandboxed_runtime_canonical = is_canonical or pynacl.platform.IsMac() | 1282 unsandboxed_runtime_canonical = is_canonical or pynacl.platform.IsMac() |
1280 packages.update(pnacl_targetlibs.UnsandboxedRuntime( | 1283 packages.update(pnacl_targetlibs.UnsandboxedRuntime( |
1281 'x86-32-%s' % pynacl.platform.GetOS(), unsandboxed_runtime_canonical)) | 1284 'x86-32-%s' % pynacl.platform.GetOS(), unsandboxed_runtime_canonical)) |
1285 packages.update(pnacl_targetlibs.UnsandboxedRuntime( | |
1286 'arm-%s' % pynacl.platform.GetOS(), unsandboxed_runtime_canonical)) | |
1282 | 1287 |
1283 if args.build_sbtc and not args.pnacl_in_pnacl: | 1288 if args.build_sbtc and not args.pnacl_in_pnacl: |
1284 packages.update(pnacl_sandboxed_translator.SandboxedTranslators( | 1289 packages.update(pnacl_sandboxed_translator.SandboxedTranslators( |
1285 SANDBOXED_TRANSLATOR_ARCHES)) | 1290 SANDBOXED_TRANSLATOR_ARCHES)) |
1286 | 1291 |
1287 tb = toolchain_main.PackageBuilder(packages, | 1292 tb = toolchain_main.PackageBuilder(packages, |
1288 upload_packages, | 1293 upload_packages, |
1289 leftover_args) | 1294 leftover_args) |
1290 return tb.Main() | 1295 return tb.Main() |
1291 | 1296 |
1292 | 1297 |
1293 if __name__ == '__main__': | 1298 if __name__ == '__main__': |
1294 sys.exit(main()) | 1299 sys.exit(main()) |
OLD | NEW |