mirror of
https://github.com/minetest/irrlicht.git
synced 2025-01-13 19:30:33 +01:00
22 lines
526 B
Bash
22 lines
526 B
Bash
|
#!/bin/bash
|
||
|
export CC=afl-clang-lto
|
||
|
export CXX=afl-clang-lto++
|
||
|
export LD=$CXX
|
||
|
|
||
|
args=(-DBUILD_EXAMPLES=ON -DENABLE_OPENGL=OFF -DBUILD_SHARED_LIBS=OFF)
|
||
|
|
||
|
unset AFL_USE_ASAN
|
||
|
grep -Fq '/afl-' build2/CMakeCache.txt || rm -rf build2
|
||
|
cmake -S . -B build2 "${args[@]}"
|
||
|
nice make -C build2 clean
|
||
|
nice make -C build2 -j10
|
||
|
for f in build2/bin/Linux/*; do
|
||
|
ln -sv "../../$f" "bin/Linux/${f##*/}_noasan"
|
||
|
done
|
||
|
|
||
|
export AFL_USE_ASAN=1
|
||
|
grep -Fq '/afl-' CMakeCache.txt || rm -f CMakeCache.txt
|
||
|
cmake . "${args[@]}"
|
||
|
nice make clean
|
||
|
nice make -j10
|