Advertisement
mroche

LLVM Build Config

Feb 18th, 2020
655
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 5.41 KB | None | 0 0
  1. #!/usr/bin/bash
  2.  
  3. mkdir llvm/build2
  4. cd llvm/build2
  5. rm -rf ./*
  6.  
  7. export ORIG=/mnt/nvme/omenos/usr1
  8. export BUILDERDIR=/mnt/nvme/omenos/usr
  9. export PATH=${BUILDERDIR}/bin:${ORIG}/bin:${PATH}
  10. export LD_LIBRARY_PATH=${BUILDERDIR}/lib:${ORIG}/lib
  11. export PYTHONPATH=${BUILDERDIR}/lib64/python3.6:${ORIG}/lib64/python3.6:/usr/lib64/python3.6:/usr/lib/python3.6
  12.  
  13. # cmake -G Ninja \
  14. #   -DCMAKE_INSTALL_PREFIX=${BUILDERDIR} \
  15. #   -DCMAKE_BUILD_TYPE="RelWithDebInfo" \
  16. #   -DCMAKE_C_COMPILER="gcc" \
  17. #   -DCMAKE_CXX_COMPILER="g++" \
  18. #   -DCMAKE_CXX_STANDARD="14"\
  19. #   -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;libcxx;libcxxabi;libunwind;lldb;compiler-rt;lld;pstl;polly;openmp" \
  20. #   -DLLVM_TARGETS_TO_BUILD="X86" \
  21. #   -DLLVM_BUILD_TESTS=ON \
  22. #   -DLLVM_INCLUDE_DOCS=OFF \
  23. #   -DLLVM_ENABLE_OCAMLDOC=OFF \
  24. #   -DLLVM_ENABLE_BINDINGS=ON \
  25. #   -DLLVM_LINK_LLVM_DYLIB=ON \
  26. #   -DLLVM_BUILD_STATIC=OFF \
  27. #   -DLLVM_INSTALL_BINUTILS_SYMLINKS=ON \
  28. #   -DLLVM_INSTALL_CCTOOLS_SYMLINKS=ON \
  29. #   -DLLVM_INSTALL_UTILS=ON \
  30. #   -DC_INCLUDE_DIRS="${BUILDERDIR}/include:/usr/include" \
  31. #   -DLIBCXX_ENABLE_STATIC=OFF \
  32. #   -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF \
  33. #   -DLIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXX=ON \
  34. #   -DLIBCXXABI_ENABLE_STATIC=OFF \
  35. #   -DLLDB_ENABLE_PYTHON=ON \
  36. #   -DLLDB_ENABLE_LUA=ON \
  37. #   -DLIBUNWIND_ENABLE_STATIC=OFF \
  38. #   ../llvm
  39.  
  40. # cmake -G Ninja \
  41. #   -DCMAKE_INSTALL_PREFIX=${BUILDERDIR} \
  42. #   -DCMAKE_BUILD_TYPE="RelWithDebInfo" \
  43. #   -DCMAKE_C_COMPILER="clang" \
  44. #   -DCMAKE_CXX_COMPILER="clang++" \
  45. #   -DCMAKE_CXX_STANDARD="14" \
  46. #   -DCMAKE_PREFIX_PATH="${BUILDERDIR}:${ORIG}:${CMAKE_PREFIX_PATH}" \
  47. #   -DCMAKE_INCLUDE_PATH="${BUILDERDIR}/include:${ORIG}/include:${CMAKE_INCLUDE_PATH}" \
  48. #   -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;libcxx;libcxxabi;libunwind;lldb;compiler-rt;lld;pstl;polly;openmp" \
  49. #   -DLLVM_TARGETS_TO_BUILD="X86" \
  50. #   -DLLVM_BUILD_TESTS=ON \
  51. #   -DLLVM_INCLUDE_DOCS=OFF \
  52. #   -DLLVM_ENABLE_OCAMLDOC=OFF \
  53. #   -DLLVM_ENABLE_BINDINGS=ON \
  54. #   -DLLVM_LINK_LLVM_DYLIB=ON \
  55. #   -DLLVM_BUILD_STATIC=OFF \
  56. #   -DLLVM_INSTALL_BINUTILS_SYMLINKS=ON \
  57. #   -DLLVM_INSTALL_CCTOOLS_SYMLINKS=ON \
  58. #   -DLLVM_INSTALL_UTILS=ON \
  59. #   -DLLVM_ENABLE_LIBCXX=ON \
  60. #   -DLLVM_ENABLE_LLD=ON \
  61. #   -DCLANG_DEFAULT_RTLIB="compiler-rt" \
  62. #   -DCLANG_DEFAULT_UNWINDLIB="libunwind" \
  63. #   -DCLANG_DEFAULT_LINKER="lld" \
  64. #   -DCLANG_DEFAULT_CXX_STDLIB="libc++" \
  65. #   -DCLANG_DEFAULT_STD_C="c17" \
  66. #   -DCLANG_DEFAULT_STD_CXX="cxx14" \
  67. #   -DC_INCLUDE_DIRS="${BUILDERDIR}/include:${ORIG}/include:/usr/include" \
  68. #   -DLIBCXX_STANDALONE_BUILD=OFF \
  69. #   -DLIBCXX_ENABLE_STATIC=OFF \
  70. #   -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF \
  71. #   -DLIBCXX_CXX_ABI="libcxxabi" \
  72. #   -DLIBCXX_USE_COMPILER_RT=ON \
  73. #   -DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=OFF \
  74. #   -DLIBCXX_CXX_ABI_INCLUDE_PATHS="${ORIG}/include/c++/v1" \
  75. #   -DLIBCXXABI_STANDALONE_BUILD=OFF \
  76. #   -DLIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXX=ON \
  77. #   -DLIBCXXABI_ENABLE_STATIC=OFF \
  78. #   -DLIBCXXABI_USE_LLVM_UNWINDER=ON \
  79. #   -DLIBCXXABI_USE_COMPILER_RT=ON \
  80. #   -DLLDB_BUILT_STANDALONE=OFF \
  81. #   -DLLDB_ENABLE_PYTHON=ON \
  82. #   -DLLDB_ENABLE_LUA=ON \
  83. #   -DLIBUNWIND_STANDALONE_BUILD=OFF \
  84. #   -DLIBUNWIND_ENABLE_SHARED=ON \
  85. #   -DLIBUNWIND_ENABLE_STATIC=OFF \
  86. #   -DLIBUNWIND_USE_COMPILER_RT=ON \
  87. #   -DSANITIZER_CXX_ABI="libc++" \
  88. #   -DSANITIZER_TEST_CXX="libc++" \
  89. #   -DCOMPILER_RT_USE_BUILTINS_LIBRARY=ON \
  90. #   -DCOMPILER_RT_STANDALONE_BUILD=OFF \
  91. #   -DOPENMP_STANDALONE_BUILD=OFF \
  92. #   ../llvm
  93.  
  94. cmake -G Ninja \
  95.     -DCMAKE_INSTALL_PREFIX=${BUILDERDIR} \
  96.     -DCMAKE_BUILD_TYPE="RelWithDebInfo" \
  97.     -DCMAKE_C_COMPILER="clang" \
  98.     -DCMAKE_CXX_COMPILER="clang++" \
  99.     -DCMAKE_CXX_STANDARD="14" \
  100.     -DCMAKE_PREFIX_PATH="${BUILDERDIR}:${ORIG}:${CMAKE_PREFIX_PATH}" \
  101.     -DCMAKE_INCLUDE_PATH="${BUILDERDIR}/include:${ORIG}/include:${CMAKE_INCLUDE_PATH}" \
  102.     -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;libcxx;libcxxabi;libunwind;lldb;compiler-rt;lld;pstl;polly;openmp" \
  103.     -DLLVM_TARGETS_TO_BUILD="X86" \
  104.     -DLLVM_BUILD_TESTS=ON \
  105.     -DLLVM_INCLUDE_DOCS=OFF \
  106.     -DLLVM_ENABLE_OCAMLDOC=OFF \
  107.     -DLLVM_ENABLE_BINDINGS=ON \
  108.     -DLLVM_LINK_LLVM_DYLIB=ON \
  109.     -DLLVM_BUILD_STATIC=OFF \
  110.     -DLLVM_INSTALL_BINUTILS_SYMLINKS=ON \
  111.     -DLLVM_INSTALL_CCTOOLS_SYMLINKS=ON \
  112.     -DLLVM_INSTALL_UTILS=ON \
  113.     -DLLVM_ENABLE_LIBCXX=ON \
  114.     -DLLVM_ENABLE_LLD=ON \
  115.     -DCLANG_DEFAULT_RTLIB="compiler-rt" \
  116.     -DCLANG_DEFAULT_UNWINDLIB="libunwind" \
  117.     -DCLANG_DEFAULT_LINKER="lld" \
  118.     -DCLANG_DEFAULT_CXX_STDLIB="libc++" \
  119.     -DCLANG_DEFAULT_STD_C="c17" \
  120.     -DCLANG_DEFAULT_STD_CXX="cxx14" \
  121.     -DC_INCLUDE_DIRS="${BUILDERDIR}/include:${ORIG}/include:/usr/include" \
  122.     -DLIBCXX_STANDALONE_BUILD=OFF \
  123.     -DLIBCXX_ENABLE_STATIC=OFF \
  124.     -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF \
  125.     -DLIBCXX_CXX_ABI="libcxxabi" \
  126.     -DLIBCXX_USE_COMPILER_RT=ON \
  127.     -DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=OFF \
  128.     -DLIBCXX_CXX_ABI_INCLUDE_PATHS="${ORIG}/include/c++/v1" \
  129.     -DLIBCXXABI_STANDALONE_BUILD=OFF \
  130.     -DLIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXX=ON \
  131.     -DLIBCXXABI_ENABLE_STATIC=OFF \
  132.     -DLIBCXXABI_USE_LLVM_UNWINDER=ON \
  133.     -DLIBCXXABI_USE_COMPILER_RT=ON \
  134.     -DLLDB_BUILT_STANDALONE=OFF \
  135.     -DLLDB_ENABLE_PYTHON=ON \
  136.     -DLLDB_ENABLE_LUA=ON \
  137.     -DLIBUNWIND_STANDALONE_BUILD=OFF \
  138.     -DLIBUNWIND_ENABLE_SHARED=ON \
  139.     -DLIBUNWIND_ENABLE_STATIC=OFF \
  140.     -DLIBUNWIND_USE_COMPILER_RT=ON \
  141.     -DSANITIZER_CXX_ABI="libc++" \
  142.     -DSANITIZER_TEST_CXX="libc++" \
  143.     -DCOMPILER_RT_USE_BUILTINS_LIBRARY=ON \
  144.     -DCOMPILER_RT_STANDALONE_BUILD=OFF \
  145.     -DOPENMP_STANDALONE_BUILD=OFF \
  146.     ../llvm
  147.  
  148. sleep 10
  149. ninja -j8
  150.  
  151. #ninja install
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement