Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make build.sh accept external LLVM_DIR #103

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,30 @@
# !bash
#!/usr/bin/env bash

# type './build.sh' for release build
# type './build.sh debug' for debug build

#########
# Please change the following home directories of your LLVM builds
########
LLVMRELEASE=/home/ysui/llvm-7.0.0/llvm-7.0.0.obj
LLVMDEBUG=/home/ysui/llvm-7.0.0/llvm-7.0.0.dbg
LLVMRELEASE=$HOME/llvm-7.0.0/llvm-7.0.0.obj
LLVMDEBUG=$HOME/llvm-7.0.0/llvm-7.0.0.dbg

if [[ $1 == 'debug' ]]
then
BuildTY='Debug'
export LLVM_DIR=$LLVMDEBUG
TMP_LLVM_DIR=$LLVMDEBUG
else
BuildTY='Release'
export LLVM_DIR=$LLVMRELEASE
TMP_LLVM_DIR=$LLVMRELEASE
fi

if [[ -z "$LLVM_DIR" ]]; then
export LLVM_DIR=$TMP_LLVM_DIR
fi

if ! [[ -d $LLVM_DIR ]]; then
echo "\$LLVM_DIR: $LLVM_DIR is not a directory"
exit 1
fi

export PATH=$LLVM_DIR/bin:$PATH
Expand Down