- Clone repositories
https://llvm.org/docs/GettingStarted.html
% cd llvmrepos
% git clone https://git.llvm.org/git/llvm.git/
% git config branch.master.rebase true
% cd llvm/tools
% git clone https://git.llvm.org/git/clang.git/
% git config branch.master.rebase true
% cd llvm/projects
% git clone https://git.llvm.org/git/compiler-rt.git/
% git config branch.master.rebase true
- Configure and build LLVM and clang
cd llvmrepos/llvm
mkdir objdir
cd objdir
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DLLVM_TARGETS_TO_BUILD=X86 ..
make -j 8