Compiling LLVM from source is mandatory if you are developing an in-source pass (within LLVM source tree). For example, a debug build of LLVM is much more pleasant to work with compared to an optimized one. To compile LLVM, please follow the following steps:
-
Download LLVM source and unpack it in a directory of your choice which will refer to as [LLVM_SRC]
-
Create a Seperate Build folder in your choice of directory
$ mkdir llvm-build
$ cd llvm-build