|
1 | 1 | #!/bin/bash |
2 | 2 |
|
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) |
5 | 6 |
|
6 | 7 | # Detect the operating system type and store it in sysOS |
7 | 8 | sysOS=`uname -s` |
8 | 9 |
|
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 |
14 | 13 |
|
15 | 14 | # Set the home directories for LLVM and Z3 |
16 | 15 | LLVMHome="llvm-${LLVMVer}.obj" |
17 | 16 | Z3Home="z3.obj" |
18 | 17 |
|
19 | 18 | # Change this to your SVF root directory |
20 | | -svf_root=`pwd`/../SVF |
| 19 | +svf_root=$PROJECTHOME/../SVF |
21 | 20 |
|
22 | 21 | # Export the paths for the LLVM, Z3, and SVF directories |
23 | 22 | export LLVM_DIR=$svf_root/$LLVMHome |
24 | 23 | export Z3_DIR=$svf_root/$Z3Home |
25 | 24 | export SVF_DIR=$svf_root |
26 | 25 |
|
27 | 26 | # 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 |
29 | 33 | export PATH=$LLVM_DIR/bin:$PATH |
| 34 | +export PATH=$PROJECTHOME/build/bin:$PATH |
30 | 35 | export PATH=$PROJECTHOME/bin:$PATH |
31 | 36 |
|
32 | 37 | # Print the paths to the terminal for verification |
|
0 commit comments