1
0
This commit is contained in:
sfan5
2023-09-18 17:13:32 +02:00
parent 4ca90e3dfd
commit 275e152523
5 changed files with 65 additions and 14 deletions

View File

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