2016-09-02 15:56:53 +00:00
|
|
|
#!/bin/bash -eu
|
|
|
|
|
|
|
|
./configure
|
2016-12-07 14:47:37 +00:00
|
|
|
make -j$(nproc) clean
|
|
|
|
make -j$(nproc) all
|
2016-09-02 15:56:53 +00:00
|
|
|
|
2018-11-07 18:20:02 +00:00
|
|
|
# Do not make check as there are tests that fail when compiled with MSAN.
|
|
|
|
# make -j$(nproc) check
|
|
|
|
|
2019-10-22 18:43:04 +00:00
|
|
|
for f in $(find $SRC -name '*_fuzzer.cc'); do
|
|
|
|
b=$(basename -s .cc $f)
|
|
|
|
$CXX $CXXFLAGS -std=c++11 -I. $f -o $OUT/$b $LIB_FUZZING_ENGINE ./libz.a
|
|
|
|
done
|
2018-11-07 18:20:02 +00:00
|
|
|
|
|
|
|
zip $OUT/seed_corpus.zip *.*
|
|
|
|
|
|
|
|
for f in $(find $SRC -name '*_fuzzer.c'); do
|
|
|
|
b=$(basename -s .c $f)
|
|
|
|
$CC $CFLAGS -I. $f -c -o /tmp/$b.o
|
2019-05-01 15:09:55 +00:00
|
|
|
$CXX $CXXFLAGS -o $OUT/$b /tmp/$b.o -stdlib=libc++ $LIB_FUZZING_ENGINE ./libz.a
|
2018-11-07 18:20:02 +00:00
|
|
|
rm -f /tmp/$b.o
|
2019-04-04 19:54:37 +00:00
|
|
|
ln -sf $OUT/seed_corpus.zip $OUT/${b}_seed_corpus.zip
|
2018-11-07 18:20:02 +00:00
|
|
|
done
|