Last active
August 22, 2023 22:58
-
-
Save lefticus/d2069c0284d12a5882d85c78a890f5b8 to your computer and use it in GitHub Desktop.
A script for building LLVM
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
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