Created
July 31, 2015 16:00
-
-
Save tuxology/357d8826e97eb72c9277 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e -x | |
numcpu=$(grep -c ^processor /proc/cpuinfo) | |
git clone https://github.com/llvm-mirror/llvm.git | |
git clone https://github.com/llvm-mirror/clang.git llvm/tools/clang | |
mkdir llvm/build/ | |
cd llvm/build/ | |
cmake .. \ | |
-DBUILD_SHARED_LIBS=OFF \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DLLVM_ENABLE_TERMINFO=OFF \ | |
-DLLVM_TARGETS_TO_BUILD="ARM;CppBackend;X86;BPF" \ | |
-DCMAKE_INSTALL_PREFIX=/opt/local/llvm | |
make -j$numcpu | |
sudo make install | |
grep -q llvm $HOME/.bashrc || echo 'PATH=/opt/local/llvm/bin:$PATH' >> $HOME/.bashrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment