下载
git clone https://github.com/llvm/llvm-project.git cd llvm-project git checkout release/12.x
编译:
mkdir build cd build/ cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/junqiang/llvm-12.x -DCMAKE_BUILD_TYPE=Debug -DLLVM_ENABLE_ASSERTIONS=On -DCMAKE_C_COMPILER=/usr/local/bin/gcc ../llvm/
make
make install