Docs
Source
git clone http://llvm.org/git/llvm.git
# upstream is SVN so always rebase master
git config branch.master.rebase true
# clangc
cd tools
git clone http://llvm.org/git/clang.git
git config branch.master.rebase true
Build
Prerequisites
sudo apt-get build-dep llvm clang
sudo apt-get install ninja-build ccache
Extra RAM
Had 4GB with 6GB zram0. Bumping zram0 to 8GB worked.
cat /sys/block/zram0/disksize # current size, readonly while in use
swapoff /dev/zram0
rmmod zram # what's the proper way to disable a zram dev?
modprobe zram
echo 8G > /sys/block/zram0/disksize
mkswap /dev/zram0
swapon /dev/zram0
Compile
mkdir build && cd build
cmake -G Ninja \
-DLLVM\_TARGETS\_TO_BUILD="X86;MSP430" \
-DCMAKE\_INSTALL\_PREFIX=/usr/local \
-DLLVM\_BUILD\_LLVM_DYLIB=true \
../
ninja