Skip to content

Instantly share code, notes, and snippets.

@lefticus

lefticus/get_llvm.sh

Last active Dec 16, 2019
Embed
What would you like to do?
A script for building LLVM
if [ $# -gt 1 ]
then
echo "Checking out LLVM '$1' branch from svn into '`pwd`/llvm' and setting install prefix to '$2'"
echo "Press Return To Continue"
read $VAR
else
echo "Usage: $0 <branch name> <install prefix>"
exit
fi
git clone https://github.com/llvm/llvm-project.git
mkdir -p llvm-build
pushd llvm-build
CXX=$COMPILER cmake -G "Ninja" ../llvm-project/llvm -DCMAKE_BUILD_TYPE:STRING=Release -DLLVM_ENABLE_PROJECTS:STRING=clang -DCMAKE_INSTALL_PREFIX:PATH=$2 -DCOMPILER_RT_INCLUDE_TESTS:BOOL=OFF -DLLVM_ENABLE_ASSERTIONS:BOOL=OFF -DLLVM_OPTIMIZED_TABLEGEN:BOOL=ON -DLLVM_CCACHE_BUILD:BOOL=ON
popd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.