derle.sh 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. cd "${SRC}/cfe-${surum}.src"
  2. mkdir build
  3. mv "${SRC}/clang-tools-extra-${surum}.src" tools/extra
  4. patch -Np1 -i ../enable-SSP-and-PIE-by-default.patch
  5. # The following patch was reverted upstream because it triggered an ICE with
  6. # GCC 7; however, we need it to pass the test suite when building with GCC 9
  7. # https://bugs.llvm.org/show_bug.cgi?id=40547
  8. patch -Np1 -i ../0001-Fix-uninitialized-value-in-ABIArgInfo.patch
  9. # Backported patches for intel-opencl-clang and intel-compute-runtime
  10. patch -Np1 -i ../0001-OpenCL-Change-type-of-block-pointer-for-OpenCL.patch
  11. patch -Np1 -i ../0002-OpenCL-Simplify-LLVM-IR-generated-for-OpenCL-blocks.patch
  12. patch -Np1 -i ../0003-OpenCL-Fix-assertion-due-to-blocks.patch
  13. # Fix inclusion of /usr/bin/clang-doc
  14. patch -Np1 -d tools/extra <../clang-doc-build-as-clang_tool.patch
  15. cd "${SRC}/cfe-${surum}.src/build"
  16. cmake .. -G Ninja \
  17. -DCMAKE_BUILD_TYPE=Release \
  18. -DCMAKE_INSTALL_PREFIX=/usr \
  19. -DPYTHON_EXECUTABLE=/usr/bin/python2 \
  20. -DBUILD_SHARED_LIBS=ON \
  21. -DLLVM_LINK_LLVM_DYLIB=ON \
  22. -DLLVM_ENABLE_RTTI=ON \
  23. -DLLVM_BUILD_TESTS=OFF \
  24. -DLLVM_INCLUDE_DOCS=OFF \
  25. -DLLVM_BUILD_DOCS=OFF \
  26. -DLLVM_ENABLE_SPHINX=OFF \
  27. -DLLVM_EXTERNAL_LIT=/usr/bin/lit \
  28. -DSPHINX_WARNINGS_AS_ERRORS=OFF \
  29. -DLLVM_MAIN_SRC_DIR="${SRC}/llvm-${surum}.src"
  30. ninja