Created
May 7, 2014 19:19
-
-
Save hjmjohnson/71be4227eff0ab858bfb to your computer and use it in GitHub Desktop.
Public llvm_builder.sh
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 | |
USER_DIR=$(whoami) | |
BASE_DIR=/scratch/${USER_DIR}/src/ | |
mkdir -p ${BASE_DIR} | |
if [ ! -d ${BASE_DIR} ]; then | |
echo "ERROR: ${BASE_DIR} does not exists" | |
exit -1 | |
fi | |
VERSION=${VERSION} | |
VERSION=trunk | |
NAME=llvm_trunk | |
cd ${BASE_DIR} && \ | |
svn co http://llvm.org/svn/llvm-project/llvm/${VERSION} ${NAME} | |
cd ${BASE_DIR}/${NAME}/projects && \ | |
svn co http://llvm.org/svn/llvm-project/compiler-rt/${VERSION} compiler-rt | |
svn co http://llvm.org/svn/llvm-project/test-suite/${VERSION} test-suite | |
cd ${BASE_DIR}/${NAME}/tools && \ | |
svn co http://llvm.org/svn/llvm-project/cfe/${VERSION} clang | |
cd ${BASE_DIR}/${NAME}/tools/clang/tools && \ | |
svn co http://llvm.org/svn/llvm-project/clang-tools-extra/${VERSION} extra | |
mkdir -p ${BASE_DIR}/${NAME}-build | |
cd ${BASE_DIR}/${NAME}-build | |
export CC=/usr/bin/clang | |
export CXX=/usr/bin/clang++ | |
cmake ../${NAME} -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/opt/${NAME} | |
# autoconf build mechanism ../${NAME}/configure --prefix=/opt/${NAME} --enable-optimized | |
make -j23 | |
echo cd $(pwd) | |
echo sudo make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment