Created
December 2, 2017 10:05
-
-
Save RadhikaG/6c1f5010b9a5a15e4d66837d3568cdde to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
# See: https://llvm.org/docs/GettingStarted.html | |
# Download this script onto your home directory, ie. whatever is $HOME for you. | |
# outputs all the commands run to stdout | |
set -x | |
echo $HOME | |
mkdir compiler_session && cd compiler_session | |
# Downloading the llvm source | |
svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm | |
# Downloading the clang source and adding it to the right directory | |
cd llvm/tools | |
svn co http://llvm.org/svn/llvm-project/cfe/trunk clang | |
cd llvm | |
mkdir _build && cd _build | |
# Generating Makefiles for llvm | |
cmake -G "Unix Makefiles" -DLLVM_TARGETS_TO_BUILD="X86" ../ | |
# Building llvm | |
cmake --build . | |
# Installing llvm | |
cmake -DCMAKE_INSTALL_PREFIX=$HOME/compiler_session/ -P cmake_install.cmake |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment