Skip to content

Instantly share code, notes, and snippets.

@nojima
Last active August 29, 2015 14:05
Show Gist options
  • Save nojima/98c2cd48140af289aee9 to your computer and use it in GitHub Desktop.
Save nojima/98c2cd48140af289aee9 to your computer and use it in GitHub Desktop.
LLVM と clang をビルドしてインストールする。
#!/bin/sh
set -xe
# Install requirements
sudo apt-get install build-essential unzip zip man subversion python
# Checkout repositories
svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
cd llvm/tools
svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
cd clang/tools
svn co http://llvm.org/svn/llvm-project/clang-tools-extra/trunk extra
cd ../../../projects
svn co http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
cd ../..
# Configure and build
mkdir llvm-build
cd llvm-build
../llvm/configure --enable-optimized --disable-assertions --enable-targets=host
make -j4
# Install LLVM and clang
sudo make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment