I have been working on a project called LLVM# - Native C# compiler. For that I needed to compile LLVM (even though they provide official binary bit of LLVM).
(For windows users please use cygwin or mingw to compile.)
This tutorial teaches you how to compile LLVM version 2.5.
Download the llvm source code
Note: For windows users who don't have
wget you can download from here. or manually download the llvm source code from the official download links.
Extracting the source code
tar xzf llvm-2.5.tar.gz
Note: For windows users you can obtain the
tar binaries from here or use your favorite file extractor.
mkdir llvm-2.5-obj cd llvm-2.5-obj ../llvm-2.5/configure --enable-optimized make sudo make install
Note: Please make sure that
make is also installed. For windows user you do not need to run as the root user. You can just type
For the offical up-to-date version of compiling llvm, please refer to the official site at https://llvm.org/docs/GettingStarted.html