2023-09-18 17:13:32 +02:00
|
|
|
#!/bin/bash -e
|
2023-09-17 23:40:31 +02:00
|
|
|
args=(-DBUILD_EXAMPLES=ON -DENABLE_OPENGL=OFF -DBUILD_SHARED_LIBS=OFF)
|
|
|
|
|
2023-09-18 17:13:32 +02:00
|
|
|
export CC=afl-clang-fast
|
|
|
|
export CXX=afl-clang-fast++
|
|
|
|
export LD=$CXX
|
2023-09-17 23:40:31 +02:00
|
|
|
unset AFL_USE_ASAN
|
2023-09-18 17:13:32 +02:00
|
|
|
if ! grep -Fq '/afl-' build2/CMakeCache.txt; then
|
|
|
|
rm -rf build2
|
|
|
|
cmake -S . -B build2 "${args[@]}"
|
|
|
|
fi
|
2023-09-17 23:40:31 +02:00
|
|
|
nice make -C build2 clean
|
|
|
|
nice make -C build2 -j10
|
|
|
|
for f in build2/bin/Linux/*; do
|
2023-09-18 17:13:32 +02:00
|
|
|
ln -snfv "../../$f" "bin/Linux/${f##*/}_noasan"
|
2023-09-17 23:40:31 +02:00
|
|
|
done
|
|
|
|
|
2023-09-18 17:13:32 +02:00
|
|
|
export CC=afl-clang-lto
|
|
|
|
export CXX=afl-clang-lto++
|
|
|
|
export LD=$CXX
|
2023-09-17 23:40:31 +02:00
|
|
|
export AFL_USE_ASAN=1
|
2023-09-18 17:13:32 +02:00
|
|
|
if ! grep -Fq '/afl-' CMakeCache.txt; then
|
|
|
|
rm -f CMakeCache.txt
|
|
|
|
cmake . "${args[@]}"
|
|
|
|
fi
|
2023-09-17 23:40:31 +02:00
|
|
|
nice make clean
|
|
|
|
nice make -j10
|