2017-07-26 05:56:37 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
BRANCH=trunk
|
2017-10-29 23:01:21 +00:00
|
|
|
#BRANCH=tags/RELEASE_500/final
|
2017-07-26 05:56:37 +00:00
|
|
|
|
|
|
|
THREADS=$(grep -c ^processor /proc/cpuinfo)
|
|
|
|
|
|
|
|
cd ~
|
2017-10-08 22:53:38 +00:00
|
|
|
sudo apt-get install -y subversion cmake
|
2017-09-10 03:29:40 +00:00
|
|
|
|
2017-07-26 05:56:37 +00:00
|
|
|
mkdir llvm
|
|
|
|
cd llvm
|
|
|
|
svn co "http://llvm.org/svn/llvm-project/llvm/${BRANCH}" llvm
|
2017-09-10 03:29:40 +00:00
|
|
|
|
2017-07-26 05:56:37 +00:00
|
|
|
cd llvm/tools
|
|
|
|
svn co "http://llvm.org/svn/llvm-project/cfe/${BRANCH}" clang
|
2017-09-08 00:25:25 +00:00
|
|
|
svn co "http://llvm.org/svn/llvm-project/lld/${BRANCH}" lld
|
|
|
|
svn co "http://llvm.org/svn/llvm-project/polly/${BRANCH}" polly
|
2017-09-10 03:29:40 +00:00
|
|
|
|
2017-09-08 00:25:25 +00:00
|
|
|
cd clang/tools
|
|
|
|
svn co "http://llvm.org/svn/llvm-project/clang-tools-extra/${BRANCH}" extra
|
2017-09-10 03:29:40 +00:00
|
|
|
|
|
|
|
git clone https://github.com/include-what-you-use/include-what-you-use.git
|
|
|
|
echo 'add_subdirectory(include-what-you-use)' >> CMakeLists.txt
|
|
|
|
sudo apt-get install libncurses5-dev
|
|
|
|
|
2017-09-08 00:25:25 +00:00
|
|
|
cd ../../../..
|
|
|
|
cd llvm/projects/
|
2017-07-26 05:56:37 +00:00
|
|
|
svn co "http://llvm.org/svn/llvm-project/compiler-rt/${BRANCH}" compiler-rt
|
2017-09-08 00:25:25 +00:00
|
|
|
svn co "http://llvm.org/svn/llvm-project/libcxx/${BRANCH}" libcxx
|
|
|
|
svn co "http://llvm.org/svn/llvm-project/libcxxabi/${BRANCH}" libcxxabi
|
2017-09-10 03:29:40 +00:00
|
|
|
|
2017-07-26 05:56:37 +00:00
|
|
|
cd ../..
|
|
|
|
mkdir build
|
|
|
|
cd build/
|
|
|
|
cmake -D CMAKE_BUILD_TYPE:STRING=Release ../llvm
|
|
|
|
make -j $THREADS
|
|
|
|
sudo make install
|
|
|
|
hash clang
|