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 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
681 '-DLLVM_BINUTILS_INCDIR=%(abs_binutils_pnacl_src)s/include', | 681 '-DLLVM_BINUTILS_INCDIR=%(abs_binutils_pnacl_src)s/include', |
682 '-DLLVM_BUILD_TESTS=ON', | 682 '-DLLVM_BUILD_TESTS=ON', |
683 '-DLLVM_ENABLE_ASSERTIONS=ON', | 683 '-DLLVM_ENABLE_ASSERTIONS=ON', |
684 '-DLLVM_ENABLE_LIBCXX=OFF', | 684 '-DLLVM_ENABLE_LIBCXX=OFF', |
685 '-LLVM_ENABLE_WERROR=' + ('ON' if llvm_do_werror else 'OFF'), | 685 '-LLVM_ENABLE_WERROR=' + ('ON' if llvm_do_werror else 'OFF'), |
686 '-DLLVM_ENABLE_ZLIB=OFF', | 686 '-DLLVM_ENABLE_ZLIB=OFF', |
687 '-DLLVM_EXTERNAL_CLANG_SOURCE_DIR=%(clang_src)s', | 687 '-DLLVM_EXTERNAL_CLANG_SOURCE_DIR=%(clang_src)s', |
688 '-DLLVM_EXTERNAL_SUBZERO_SOURCE_DIR=%(subzero_src)s', | 688 '-DLLVM_EXTERNAL_SUBZERO_SOURCE_DIR=%(subzero_src)s', |
689 '-DLLVM_INSTALL_UTILS=ON', | 689 '-DLLVM_INSTALL_UTILS=ON', |
690 '-DLLVM_TARGETS_TO_BUILD=X86;ARM;Mips;JSBackend', | 690 '-DLLVM_TARGETS_TO_BUILD=X86;ARM;Mips;JSBackend', |
691 '-DSUBZERO_TARGETS_TO_BUILD=X8632;ARM32;MIPS32', | 691 '-DSUBZERO_TARGETS_TO_BUILD=ARM32;MIPS32;X8632;X8664', |
692 '%(llvm_src)s'], | 692 '%(llvm_src)s'], |
693 # Older CMake ignore CMAKE_*_LINKER_FLAGS during config step. | 693 # Older CMake ignore CMAKE_*_LINKER_FLAGS during config step. |
694 # https://public.kitware.com/Bug/view.php?id=14066 | 694 # https://public.kitware.com/Bug/view.php?id=14066 |
695 # The workaround is to set LDFLAGS in the environment. | 695 # The workaround is to set LDFLAGS in the environment. |
696 # TODO(jvoung): remove the ability to override env vars | 696 # TODO(jvoung): remove the ability to override env vars |
697 # from "command" once the CMake fix propagates and we can | 697 # from "command" once the CMake fix propagates and we can |
698 # stop using this env var hack. | 698 # stop using this env var hack. |
699 env={'LDFLAGS' : ' '.join( | 699 env={'LDFLAGS' : ' '.join( |
700 HostArchToolFlags(host, [], options)['LDFLAGS'])})] + | 700 HostArchToolFlags(host, [], options)['LDFLAGS'])})] + |
701 CopyHostLibcxxForLLVMBuild(host, 'lib', options) + | 701 CopyHostLibcxxForLLVMBuild(host, 'lib', options) + |
(...skipping 25 matching lines...) Expand all Loading... |
727 [ | 727 [ |
728 '--disable-bindings', # ocaml is currently the only binding. | 728 '--disable-bindings', # ocaml is currently the only binding. |
729 '--disable-jit', | 729 '--disable-jit', |
730 '--disable-terminfo', | 730 '--disable-terminfo', |
731 '--disable-zlib', | 731 '--disable-zlib', |
732 '--enable-optimized=' + ('no' if HostIsDebug(options) | 732 '--enable-optimized=' + ('no' if HostIsDebug(options) |
733 else 'yes'), | 733 else 'yes'), |
734 '--enable-debug=' + ('yes' if HostIsDebug(options) | 734 '--enable-debug=' + ('yes' if HostIsDebug(options) |
735 else 'no'), | 735 else 'no'), |
736 '--enable-targets=x86,arm,mips,js', | 736 '--enable-targets=x86,arm,mips,js', |
737 '--enable-subzero-targets=X8632,ARM32,MIPS32', | 737 '--enable-subzero-targets=ARM32,MIPS32,X8632,X8664', |
738 '--enable-werror=' + ('yes' if llvm_do_werror else 'no'), | 738 '--enable-werror=' + ('yes' if llvm_do_werror else 'no'), |
739 # Backtraces require TLS, which is missing on OSX 10.6 | 739 # Backtraces require TLS, which is missing on OSX 10.6 |
740 '--enable-backtraces=' + ('no' if TripleIsMac(host) | 740 '--enable-backtraces=' + ('no' if TripleIsMac(host) |
741 else 'yes'), | 741 else 'yes'), |
742 '--prefix=/', | 742 '--prefix=/', |
743 '--program-prefix=', | 743 '--program-prefix=', |
744 '--with-binutils-include=%(abs_binutils_pnacl_src)s/include', | 744 '--with-binutils-include=%(abs_binutils_pnacl_src)s/include', |
745 '--with-clang-srcdir=%(abs_clang_src)s', | 745 '--with-clang-srcdir=%(abs_clang_src)s', |
746 'ac_cv_have_decl_strerror_s=no', | 746 'ac_cv_have_decl_strerror_s=no', |
747 ] + shared)] + | 747 ] + shared)] + |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1172 'x86-32-%s' % pynacl.platform.GetOS(), unsandboxed_runtime_canonical)) | 1172 'x86-32-%s' % pynacl.platform.GetOS(), unsandboxed_runtime_canonical)) |
1173 | 1173 |
1174 if args.build_sbtc and not args.pnacl_in_pnacl: | 1174 if args.build_sbtc and not args.pnacl_in_pnacl: |
1175 packages.update(pnacl_sandboxed_translator.SandboxedTranslators( | 1175 packages.update(pnacl_sandboxed_translator.SandboxedTranslators( |
1176 SANDBOXED_TRANSLATOR_ARCHES)) | 1176 SANDBOXED_TRANSLATOR_ARCHES)) |
1177 | 1177 |
1178 tb = toolchain_main.PackageBuilder(packages, | 1178 tb = toolchain_main.PackageBuilder(packages, |
1179 upload_packages, | 1179 upload_packages, |
1180 leftover_args) | 1180 leftover_args) |
1181 sys.exit(tb.Main()) | 1181 sys.exit(tb.Main()) |
OLD | NEW |