| 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 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 665 '-DLLVM_BINUTILS_INCDIR=%(abs_binutils_pnacl_src)s/include', | 665 '-DLLVM_BINUTILS_INCDIR=%(abs_binutils_pnacl_src)s/include', |
| 666 '-DLLVM_BUILD_TESTS=ON', | 666 '-DLLVM_BUILD_TESTS=ON', |
| 667 '-DLLVM_ENABLE_ASSERTIONS=ON', | 667 '-DLLVM_ENABLE_ASSERTIONS=ON', |
| 668 '-DLLVM_ENABLE_LIBCXX=OFF', | 668 '-DLLVM_ENABLE_LIBCXX=OFF', |
| 669 '-LLVM_ENABLE_WERROR=' + ('ON' if llvm_do_werror else 'OFF'), | 669 '-LLVM_ENABLE_WERROR=' + ('ON' if llvm_do_werror else 'OFF'), |
| 670 '-DLLVM_ENABLE_ZLIB=OFF', | 670 '-DLLVM_ENABLE_ZLIB=OFF', |
| 671 '-DLLVM_EXTERNAL_CLANG_SOURCE_DIR=%(clang_src)s', | 671 '-DLLVM_EXTERNAL_CLANG_SOURCE_DIR=%(clang_src)s', |
| 672 '-DLLVM_EXTERNAL_SUBZERO_SOURCE_DIR=%(subzero_src)s', | 672 '-DLLVM_EXTERNAL_SUBZERO_SOURCE_DIR=%(subzero_src)s', |
| 673 '-DLLVM_INSTALL_UTILS=ON', | 673 '-DLLVM_INSTALL_UTILS=ON', |
| 674 '-DLLVM_TARGETS_TO_BUILD=X86;ARM;Mips;JSBackend', | 674 '-DLLVM_TARGETS_TO_BUILD=X86;ARM;Mips;JSBackend', |
| 675 '-DSUBZERO_TARGETS_TO_BUILD=X8632;ARM32', |
| 675 '%(llvm_src)s'], | 676 '%(llvm_src)s'], |
| 676 # Older CMake ignore CMAKE_*_LINKER_FLAGS during config step. | 677 # Older CMake ignore CMAKE_*_LINKER_FLAGS during config step. |
| 677 # https://public.kitware.com/Bug/view.php?id=14066 | 678 # https://public.kitware.com/Bug/view.php?id=14066 |
| 678 # The workaround is to set LDFLAGS in the environment. | 679 # The workaround is to set LDFLAGS in the environment. |
| 679 # TODO(jvoung): remove the ability to override env vars | 680 # TODO(jvoung): remove the ability to override env vars |
| 680 # from "command" once the CMake fix propagates and we can | 681 # from "command" once the CMake fix propagates and we can |
| 681 # stop using this env var hack. | 682 # stop using this env var hack. |
| 682 env={'LDFLAGS' : ' '.join( | 683 env={'LDFLAGS' : ' '.join( |
| 683 HostArchToolFlags(host, [], options)['LDFLAGS'])})] + | 684 HostArchToolFlags(host, [], options)['LDFLAGS'])})] + |
| 684 CopyHostLibcxxForLLVMBuild(host, 'lib', options) + | 685 CopyHostLibcxxForLLVMBuild(host, 'lib', options) + |
| (...skipping 24 matching lines...) Expand all Loading... |
| 709 [ | 710 [ |
| 710 '--disable-bindings', # ocaml is currently the only binding. | 711 '--disable-bindings', # ocaml is currently the only binding. |
| 711 '--disable-jit', | 712 '--disable-jit', |
| 712 '--disable-terminfo', | 713 '--disable-terminfo', |
| 713 '--disable-zlib', | 714 '--disable-zlib', |
| 714 '--enable-optimized=' + ('no' if HostIsDebug(options) | 715 '--enable-optimized=' + ('no' if HostIsDebug(options) |
| 715 else 'yes'), | 716 else 'yes'), |
| 716 '--enable-debug=' + ('yes' if HostIsDebug(options) | 717 '--enable-debug=' + ('yes' if HostIsDebug(options) |
| 717 else 'no'), | 718 else 'no'), |
| 718 '--enable-targets=x86,arm,mips,js', | 719 '--enable-targets=x86,arm,mips,js', |
| 720 '--enable-subzero-targets=X8632,ARM32', |
| 719 '--enable-werror=' + ('yes' if llvm_do_werror else 'no'), | 721 '--enable-werror=' + ('yes' if llvm_do_werror else 'no'), |
| 720 '--prefix=/', | 722 '--prefix=/', |
| 721 '--program-prefix=', | 723 '--program-prefix=', |
| 722 '--with-binutils-include=%(abs_binutils_pnacl_src)s/include', | 724 '--with-binutils-include=%(abs_binutils_pnacl_src)s/include', |
| 723 '--with-clang-srcdir=%(abs_clang_src)s', | 725 '--with-clang-srcdir=%(abs_clang_src)s', |
| 724 'ac_cv_have_decl_strerror_s=no', | 726 'ac_cv_have_decl_strerror_s=no', |
| 725 ] + shared)] + | 727 ] + shared)] + |
| 726 CopyHostLibcxxForLLVMBuild( | 728 CopyHostLibcxxForLLVMBuild( |
| 727 host, | 729 host, |
| 728 os.path.join(('Debug+Asserts' if HostIsDebug(options) | 730 os.path.join(('Debug+Asserts' if HostIsDebug(options) |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1172 'x86-32-%s' % pynacl.platform.GetOS(), unsandboxed_runtime_canonical)) | 1174 'x86-32-%s' % pynacl.platform.GetOS(), unsandboxed_runtime_canonical)) |
| 1173 | 1175 |
| 1174 if args.build_sbtc and not args.pnacl_in_pnacl: | 1176 if args.build_sbtc and not args.pnacl_in_pnacl: |
| 1175 packages.update(pnacl_sandboxed_translator.SandboxedTranslators( | 1177 packages.update(pnacl_sandboxed_translator.SandboxedTranslators( |
| 1176 SANDBOXED_TRANSLATOR_ARCHES)) | 1178 SANDBOXED_TRANSLATOR_ARCHES)) |
| 1177 | 1179 |
| 1178 tb = toolchain_main.PackageBuilder(packages, | 1180 tb = toolchain_main.PackageBuilder(packages, |
| 1179 upload_packages, | 1181 upload_packages, |
| 1180 leftover_args) | 1182 leftover_args) |
| 1181 tb.Main() | 1183 tb.Main() |
| OLD | NEW |