Created
March 10, 2012 08:13
-
-
Save ttilley/2010803 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
#!/usr/bin/env bash | |
LLVM_SVN='http://llvm.org/svn/llvm-project/llvm/trunk' | |
CLANG_SVN='http://llvm.org/svn/llvm-project/cfe/trunk' | |
POLLY_SVN='http://llvm.org/svn/llvm-project/polly/trunk' | |
COMPILER_RT_SVN='http://llvm.org/svn/llvm-project/compiler-rt/trunk' | |
LIBCXX_SVN='http://llvm.org/svn/llvm-project/libcxx/trunk' | |
export BASE=`pwd` | |
export LLVM_SRC="${BASE}/llvm" | |
export CLANG_SRC="${LLVM_SRC}/tools/clang" | |
export POLLY_SRC="${LLVM_SRC}/tools/polly" | |
export COMPILER_RT_SRC="${LLVM_SRC}/projects/compiler-rt" | |
export LIBCXX_SRC="${LLVM_SRC}/projects/libcxx" | |
export CLOOG_SRC="${BASE}/cloog_src" | |
export CLOOG_INSTALL="${BASE}/cloog_install" | |
export LLVM_BUILD="${BASE}/llvm-build" | |
export LLVM_INSTALL="/usr/local/Cellar/llvm/HEAD" | |
svn checkout "${LLVM_SVN}" "${LLVM_SRC}" | |
svn checkout "${CLANG_SVN}" "${CLANG_SRC}" | |
svn checkout "${POLLY_SVN}" "${POLLY_SRC}" | |
svn checkout "${COMPILER_RT_SVN}" "${COMPILER_RT_SRC}" | |
svn checkout "${LIBCXX_SVN}" "${LIBCXX_SRC}" | |
${POLLY_SRC}/utils/checkout_cloog.sh ${CLOOG_SRC} | |
pushd ${CLOOG_SRC} | |
./configure --prefix=${CLOOG_INSTALL} | |
make | |
make install | |
popd | |
mkdir -p "${LLVM_BUILD}" | |
pushd "${LLVM_BUILD}" | |
${LLVM_SRC}/configure --prefix="${LLVM_INSTALL}" --enable-optimized --enable-bindings=none --enable-targets=x86,x86_64,powerpc,arm --enable-shared --enable-libcpp --with-cloog="${CLOOG_INSTALL}" --with-isl="${CLOOG_INSTALL}" | |
make CODESIGN_TOOLS=1 ENABLE_LIBCPP=1 OPTIMIZE_OPTION='-Os' VERBOSE=1 | |
popd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment