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