-
Notifications
You must be signed in to change notification settings - Fork 3
/
install_svf.sh
executable file
·58 lines (41 loc) · 1.13 KB
/
install_svf.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
set -e
export MAKEFLAGS="-j $(grep -c ^processor /proc/cpuinfo)"
if [ -z "${LLVM_DIR}" ]; then
echo "[ ] retrieving the LLVM directory..."
if [ -z "${LLVM_CONFIG}" ]; then
export LLVM_CONFIG='llvm-config'
fi
export LLVM_VER="$($LLVM_CONFIG --version 2>/dev/null | sed 's/git//')"
if [ "$LLVM_VER" = "" ]; then
echo "[!] llvm-config not found!"
exit 1
fi
echo "[+] using LLVM $LLVM_VER"
export PATH="$($LLVM_CONFIG --bindir)/bin:$SVF_HOME/Debug-build/bin:$PATH"
export LLVM_DIR="$($LLVM_CONFIG --prefix)"
else
export PATH="$LLVM_DIR/bin:$SVF_HOME/Debug-build/bin:$PATH"
fi
echo "[+] the LLVM directory is $LLVM_DIR"
#
# SVF
#
echo "[ ] preparing SVF..."
if [[ -d SVF ]]; then
echo "[!] the SVF directory already exists"
cd SVF
else
git clone https://github.com/SVF-tools/SVF.git SVF
cd SVF
git checkout SVF-2.1
git am -3 -k ../SVF-all.patch
git clone https://github.com/SVF-tools/Test-Suite.git
cd Test-Suite
git checkout 72c679a49b943abb229fcb1844f68dff9cc7d522
cd ..
fi
echo "[+] SVF ready"
echo "[ ] compiling SVF..."
source ./build.sh debug
echo "[+] all done, goodbye!"