-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.sh
executable file
·53 lines (43 loc) · 1.22 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
BASE_DIR=`pwd`
# 1. dependences in common
if [ ! -d "/usr/include/ctrace" ]; then
mkdir /usr/include/ctrace
fi
cp $BASE_DIR/common/DynTrace/include/* /usr/include/ctrace/ -rf
cd $BASE_DIR/common/shmqueue && make clean && make
cd $BASE_DIR/common/SASG && make clean && make
# 2. build AFL++
cd $BASE_DIR/AFLplusplus
if [ ! -f "afl-cc" ]; then
make source-only
else
make
fi
# 3. build all common components
cd $BASE_DIR/common/
make clean && make
# 4. build language-specific component
# 4.1 clang
# 4.2 java
cd $BASE_DIR/langspec/java
./build.sh
# 4.3 python
cd $BASE_DIR/langspec/python
./pybuild.sh
# 5 tools
cd $BASE_DIR/tool/BBstat
make clean && make
cd $BASE_DIR/tool/javawrapper
make clean && make
cd $BASE_DIR/tool/Perfget && ./install.sh
cp $BASE_DIR/tool/delshm.sh /usr/bin/
cp $BASE_DIR/tool/PyVersion.sh /usr/bin/
cd $BASE_DIR
# init environment
export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export BENCH=$BASE_DIR/benchmarks
export JavaCovPCG=/usr/lib/JavaCovPCG
export JepPath=$(sh /usr/bin/PyVersion.sh)/site-packages/jep
export LD_LIBRARY_PATH=$JepPath:$LD_LIBRARY_PATH
#export LD_PRELOAD="$(python -c "import atheris; print(atheris.path())")/asan_with_fuzzer.so"