Skip to content

Instantly share code, notes, and snippets.

@keisukefukuda
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keisukefukuda/9520617 to your computer and use it in GitHub Desktop.
Save keisukefukuda/9520617 to your computer and use it in GitHub Desktop.
#!/bin/sh
# -j [N] : same as "make -j N"
# -c : Compile only (not download the code)
# -d : Download only (not configure/compile the code)
#-------------------------------------
# Directory you want to install byfl
INSTALL_DIR=$HOME/local/byfl2
# Temporary directory. Should not be on NFS.
TMP_DIR=/tmp/$(whoami)-byfl-build
GCC_ROOT=$HOME/local/gcc-4.8.3 # your gcc installation directory (>= 4.6)
#-------------------------------------
GCC=${GCC_ROOT}/bin/gcc
GXX=${GCC_ROOT}/bin/g++
LLVM_REVISION=201163
NOW=$(date +%Y%m%d%H%M%S)
env CC=${GCC} \
CXX=${GXX} \
LD_LIBRARY_PATH="${GCC_ROOT}/lib:${GCC_ROOT}/lib64:$LD_LIBRARY_PATH" \
PATH=${GCC_ROOT}/bin:$PATH \
./build-llvm-byfl $* -r${LLVM_REVISION} -t -b ${TMP_DIR} ${INSTALL_DIR} 2>&1 | tee log_${NOW}.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment