-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·61 lines (47 loc) · 1.81 KB
/
build.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
59
60
61
# build script
make clean
LLVM_VERSION=3.6
MODE=DEBUG
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
DIR=/media/noname/3a224af4-22de-4deb-ad88-08422268a9fc/Inception/Analyzer/
#./autoconf/AutoRegen.sh
./autoconf/AutoRegen.sh $DIR/../tools/llvm/llvm3.6/
if [ $MODE = DEBUG ]; then
CXXFLAGS="-g3 -O0 -fexceptions" CFLAGS="-g3 -O0" ./configure \
--enable-cxx11 \
--with-stp=$DIR/../tools/stp/ \
--enable-posix-runtime \
--with-llvmsrc=$DIR/../tools/llvm/llvm$LLVM_VERSION \
--with-llvmobj=$DIR/../tools/llvm/build_debug \
--with-llvmcc=$DIR/../tools/llvm/build_debug/Debug+Asserts/bin/clang \
--with-llvmcxx=$DIR/../tools/llvm/build_debug/Debug+Asserts/bin/clang++ \
--with-uclibc=$DIR/../tools/klee-uclibc \
--with-runtime='Debug+Asserts' \
--with-llvm-build-mode='Debug+Asserts'
else
CXXFLAGS="-O3 -fexceptions" CFLAGS="-O3" ./configure \
--enable-cxx11 \
--with-stp=$DIR/../tools/stp/ \
--enable-posix-runtime \
--with-llvmsrc=$DIR/../tools/llvm/llvm$LLVM_VERSION \
--with-llvmobj=$DIR/../tools/llvm/build_release \
--with-llvmcc=$DIR/../tools/llvm/build_release/Release/bin/clang \
--with-llvmcxx=$DIR/../tools/llvm/build_release/Release/bin/clang++ \
--with-uclibc=$DIR/../tools/klee-uclibc \
--with-runtime='Release' \
--with-llvm-build-mode='Release'
fi
if [ $? != 0 ]; then
echo "FAIL to configure Klee !"
exit;
fi
#make -j 4 all KLEE_USE_CXX11 -C ../..
make clean; make -j12 all
if [ $? != 0 ]; then
echo "FAIL to compile Klee"
exit;
fi
#echo "Press any key to install klee"
#read i
sudo -S rm /usr/bin/klee
sudo -S ln -s $DIR/Debug+Asserts/bin/klee /usr/bin/klee