Install (2024/11/15)[edit]
git clone https://github.com/llvm/llvm-project.git
cd llvm-project
mkdir build
cd build
cmake -G "Unix Makefiles" \
-DCMAKE_BUILD_TYPE="Release" \
-DLLVM_ENABLE_PROJECTS="clang" \
-DLLVM_ENABLE_RUNTIMES="libcxx;libunwind;libcxxabi" \
-DCMAKE_CXX_FLAGS="-Wno-error=aggressive-loop-optimizations" \
-DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON \
-DLLVM_INCLUDE_DOCS=OFF \
-DLLVM_INCLUDE_TESTS=OFF \
-DLLVM_ENABLE_LIBCXX=ON \
../llvm
make -j$(nproc)
make install
cd /usr/local/lib
ln -s x86_64-unknown-linux-gnu/* .
vi /etc/ld.so.conf
ldconfig