sudo apt install ninja-build
sudo apt install llvm clang # 第一次编译需要
sudo apt-get install libncurses5
sudo apt-get install gcc-multilib
# maybe need: MPFR
注释掉所有其他添加的库路径:anaconda,自编译的库。
#git clone git@github.com:llvm/llvm-project.git
CC=clang CXX=clang++ cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;libclc;lld;lldb;mlir;polly;pstl" -DLLVM_ENABLE_RUNTIMES="all" ../llvm
# cmake --build . --config Release --target install --parallel
ninja -j12 && sudo ninja install
git clone https://github.com/llvm/llvm-project.git
cd llvm-project
mkdir build
cd build
cmake -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;compiler-rt;libclc;libcxx;libcxxabi;libunwind;lld;lldb;mlir;polly;pstl" -G "Visual Studio 16 2019" -A x64 -Thost=x64 ../llvm
# cmake -S llvm -B build -G "Visual Studio 16 2019" -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD="X86;WebAssembly" -DLLVM_TARGET_ARCH="x86_64" -DLLVM_BUILD_TOOLS=OFF -DLLVM_INCLUDE_TOOLS=OFF -DLLVM_BUILD_EXAMPLES=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_BUILD_TESTS=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_BENCHMARKS=OFF -DLLVM_INCLUDE_BENCHMARKS=OFF -DLLVM_USE_OPROFILE=ON -DLLVM_USE_INTEL_JITEVENTS=ON -DLLVM_ENABLE_ASSERTIONS=OFF -DLLVM_ENABLE_IDE=ON -DLLVM_USE_OPROFILE=OFF
手机扫一扫
移动阅读更方便
你可能感兴趣的文章