Skip to content

Commit 3ae8aca

Browse files
author
bjjwwang
committed
Update environment paths for LLVM 21
1 parent bab4556 commit 3ae8aca

1 file changed

Lines changed: 14 additions & 9 deletions

File tree

env.sh

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,37 @@
11
#!/bin/bash
22

3-
# Get the current working directory and store it in PROJECTHOME
4-
PROJECTHOME=$(pwd)
3+
# Get the repository directory and store it in PROJECTHOME.
4+
# This lets the script work even if it is sourced from another directory.
5+
PROJECTHOME=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
56

67
# Detect the operating system type and store it in sysOS
78
sysOS=`uname -s`
89

9-
# Set the major version of LLVM
10-
MajorLLVMVer=16
11-
12-
# Define the full LLVM version
13-
LLVMVer=${MajorLLVMVer}.0.0
10+
# Define the LLVM version used by current SVF.
11+
MajorLLVMVer=21
12+
LLVMVer=${MajorLLVMVer}.1.0
1413

1514
# Set the home directories for LLVM and Z3
1615
LLVMHome="llvm-${LLVMVer}.obj"
1716
Z3Home="z3.obj"
1817

1918
# Change this to your SVF root directory
20-
svf_root=`pwd`/../SVF
19+
svf_root=$PROJECTHOME/../SVF
2120

2221
# Export the paths for the LLVM, Z3, and SVF directories
2322
export LLVM_DIR=$svf_root/$LLVMHome
2423
export Z3_DIR=$svf_root/$Z3Home
2524
export SVF_DIR=$svf_root
2625

2726
# Update the PATH to include the binary directories for SVF, LLVM, and the project
28-
export PATH=$SVF_DIR/Release-build/bin:$PATH
27+
if [ -d "$SVF_DIR/Debug-build/bin" ]; then
28+
export PATH=$SVF_DIR/Debug-build/bin:$PATH
29+
fi
30+
if [ -d "$SVF_DIR/Release-build/bin" ]; then
31+
export PATH=$SVF_DIR/Release-build/bin:$PATH
32+
fi
2933
export PATH=$LLVM_DIR/bin:$PATH
34+
export PATH=$PROJECTHOME/build/bin:$PATH
3035
export PATH=$PROJECTHOME/bin:$PATH
3136

3237
# Print the paths to the terminal for verification

0 commit comments

Comments
 (0)