Skip to content

Instantly share code, notes, and snippets.

@Jiwan
Last active March 16, 2017 15:15
Show Gist options
  • Save Jiwan/c1ed2e37bcbb7474c7546019d4b2526c to your computer and use it in GitHub Desktop.
Save Jiwan/c1ed2e37bcbb7474c7546019d4b2526c to your computer and use it in GitHub Desktop.
Update clang script
#!/usr/bin/env bash
if [ -d "llvm" ]; then
pushd .
cd llvm/
svn cleanup
svn update
popd
else
svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
fi
if [ -d "llvm/tools/clang" ]; then
pushd .
cd llvm/tools/clang
svn cleanup
svn update
popd
else
pushd .
cd llvm/tools
svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
popd
fi
if [ -d "llvm/tools/clang/tools/extra" ]; then
pushd .
cd llvm/tools/clang/tools/extra
svn cleanup
svn update
popd
else
pushd .
cd llvm/tools/clang/tools
svn co http://llvm.org/svn/llvm-project/clang-tools-extra/trunk extra
popd
fi
if [ -d "llvm/tools/lld" ]; then
pushd .
cd llvm/tools/lld
svn cleanup
svn update
popd
else
pushd .
cd llvm/tools
svn co http://llvm.org/svn/llvm-project/lld/trunk lld
popd
fi
if [ -d "llvm/tools/polly" ]; then
pushd .
cd llvm/tools/polly
svn cleanup
svn update
popd
else
pushd .
cd llvm/tools
svn co http://llvm.org/svn/llvm-project/polly/trunk polly
popd
fi
if [ -d "llvm/projects/compiler-rt" ]; then
pushd .
cd llvm/projects/compiler-rt
svn cleanup
svn update
popd
else
pushd .
cd llvm/projects/
svn co http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
popd
fi
if [ -d "llvm/projects/openmp" ]; then
pushd .
cd llvm/projects/openmp
svn cleanup
svn update
popd
else
pushd .
cd llvm/projects/
svn co http://llvm.org/svn/llvm-project/openmp/trunk openmp
popd
fi
if [ -d "llvm/projects/libcxx" ]; then
pushd .
cd llvm/projects/libcxx
svn cleanup
svn update
popd
else
pushd .
cd llvm/projects/
svn co http://llvm.org/svn/llvm-project/libcxx/trunk libcxx
popd
fi
if [ -d "llvm/projects/libcxxabi" ]; then
pushd .
cd llvm/projects/libcxxabi
svn cleanup
svn update
popd
else
pushd .
cd llvm/projects/
svn co http://llvm.org/svn/llvm-project/libcxxabi/trunk libcxxabi
popd
fi
if [ -d "llvm/projects/test-suite" ]; then
pushd .
cd llvm/projects/test-suite
svn cleanup
svn update
popd
else
pushd .
cd llvm/projects/
svn co http://llvm.org/svn/llvm-project/test-suite/trunk test-suite
popd
fi
pushd .
mkdir -p build/
cd build
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/opt/CLANG-trunk ../llvm
make -j3
popd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment