Skip to content

Commit

Permalink
Merge pull request #299 from DavidKorczynski/fix-fuzzer-build
Browse files Browse the repository at this point in the history
Fix OSS-Fuzz build
  • Loading branch information
uroni authored Jan 6, 2024
2 parents e570065 + a77af68 commit 16413c2
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/ossfuzz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,15 @@
# This script is meant to be run by
# https://github.com/google/oss-fuzz/blob/master/projects/miniz/Dockerfile

cat << "EOF" > miniz_export.h
#ifndef MINIZ_EXPORT
#define MINIZ_EXPORT
#endif
EOF

mkdir build
cd build
cmake .. -DAMALGAMATE_SOURCES=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_FUZZERS=ON
cmake .. -DAMALGAMATE_SOURCES=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_FUZZERS=ON -DBUILD_TESTS=OFF
make -j$(nproc)
cd ..

Expand All @@ -39,4 +45,4 @@ done
rm -f $OUT/zip_fuzzer_seed_corpus.zip
zip $OUT/zip_fuzzer_seed_corpus.zip $OUT/seed_corpus.zip

cp tests/zip.dict $OUT/zip_fuzzer.dict
cp tests/zip.dict $OUT/zip_fuzzer.dict

0 comments on commit 16413c2

Please sign in to comment.