Tech /

LLVM Backend





edit SideBar

LLVM Backend

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
Recent Changes (All) | Edit SideBar Page last modified on 02 March 2016, at 04:53 PM UTC Edit Page | Page History
Powered by PmWiki