git clone https://github.com/llvm/llvm-project.git cd llvm-project 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