Skip to content

Commit

Permalink
Merge pull request #64 from jumormt/master
Browse files Browse the repository at this point in the history
update env
  • Loading branch information
yuleisui authored Feb 5, 2024
2 parents 29b3978 + d523701 commit f6fea3f
Showing 1 changed file with 21 additions and 12 deletions.
33 changes: 21 additions & 12 deletions env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,32 @@

PROJECTHOME=$(pwd)
sysOS=`uname -s`
LLVMHome="llvm-14.0.0.obj"
MajorLLVMVer=16
LLVMVer=${MajorLLVMVer}.0.0

LLVMHome="llvm-${LLVMVer}.obj"
Z3Home="z3.obj"
install_path=`npm root`
export LLVM_DIR=$install_path/$LLVMHome

if [[ $sysOS == "Darwin" ]]
then
export LLVM_DIR="$(brew --prefix llvm@${MajorLLVMVer})"
elif [[ $sysOS == "Linux" ]]
then
export LLVM_DIR=$install_path/$LLVMHome
fi

export Z3_DIR=$install_path/$Z3Home
export SVF_DIR=$install_path/SVF
export PATH=$SVF_DIR/Release-build/bin:$PATH
export PATH=$LLVM_DIR/bin:$PATH
export PATH=$PROJECTHOME/bin:$PATH
echo "export LLVM_DIR=$install_path/$LLVMHome" >> ~/.bashrc
echo "export Z3_DIR=$install_path/$Z3Home" >> ~/.bashrc
echo "export PATH=$LLVM_DIR/bin:$PROJECTHOME/bin:$PATH" >> ~/.bashrc
if [[ $sysOS == "Darwin" ]]
then
export SVF_DIR=$install_path/SVF/
elif [[ $sysOS == "Linux" ]]
then
export SVF_DIR=$install_path/SVF/
fi

echo "export LLVM_DIR=$LLVM_DIR" >> ~/.bashrc
echo "export Z3_DIR=$Z3_DIR" >> ~/.bashrc
echo "export SVF_DIR=$SVF_DIR" >> ~/.bashrc
echo "export PATH=$SVF_DIR/Release-build/bin:$LLVM_DIR/bin:$PROJECTHOME/bin:$PATH" >> ~/.bashrc


echo "LLVM_DIR="$LLVM_DIR
echo "SVF_DIR="$SVF_DIR
Expand Down

0 comments on commit f6fea3f

Please sign in to comment.