mirror of https://github.com/google/oss-fuzz.git
Moved the build script to the repository of ImageMagick. (#1078)
This commit is contained in:
parent
87106be546
commit
d371a02be8
|
@ -14,44 +14,4 @@
|
|||
#
|
||||
################################################################################
|
||||
|
||||
./configure --prefix="$WORK" --disable-shared --disable-docs
|
||||
make "-j$(nproc)"
|
||||
make install
|
||||
|
||||
$CXX $CXXFLAGS -std=c++11 -I"$WORK/include/ImageMagick-7" "$SRC/imagemagick/Magick++/fuzz/encoder_list.cc" \
|
||||
-o "$WORK/encoder_list" \
|
||||
-DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 \
|
||||
"$WORK/lib/libMagick++-7.Q16HDRI.a" \
|
||||
"$WORK/lib/libMagickWand-7.Q16HDRI.a" \
|
||||
"$WORK/lib/libMagickCore-7.Q16HDRI.a"
|
||||
|
||||
for f in $SRC/imagemagick/Magick++/fuzz/*_fuzzer.cc; do
|
||||
fuzzer=$(basename "$f" _fuzzer.cc)
|
||||
# encoder_fuzzer is special
|
||||
if [ "$fuzzer" = "encoder" ]; then
|
||||
continue
|
||||
fi
|
||||
$CXX $CXXFLAGS -std=c++11 -I"$WORK/include/ImageMagick-7" \
|
||||
"$f" -o "$OUT/${fuzzer}_fuzzer" \
|
||||
-DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 \
|
||||
-lFuzzingEngine "$WORK/lib/libMagick++-7.Q16HDRI.a" \
|
||||
"$WORK/lib/libMagickWand-7.Q16HDRI.a" "$WORK/lib/libMagickCore-7.Q16HDRI.a"
|
||||
done
|
||||
|
||||
for encoder in $("$WORK/encoder_list"); do
|
||||
$CXX $CXXFLAGS -std=c++11 -I"$WORK/include/ImageMagick-7" \
|
||||
"$SRC/imagemagick/Magick++/fuzz/encoder_fuzzer.cc" -o "$OUT/encoder_${encoder,,}_fuzzer" \
|
||||
-DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 \
|
||||
"-DFUZZ_IMAGEMAGICK_ENCODER=$encoder" \
|
||||
-lFuzzingEngine "$WORK/lib/libMagick++-7.Q16HDRI.a" \
|
||||
"$WORK/lib/libMagickWand-7.Q16HDRI.a" "$WORK/lib/libMagickCore-7.Q16HDRI.a"
|
||||
done
|
||||
|
||||
mkdir afl_testcases
|
||||
(cd afl_testcases; tar xvf "$SRC/afl_testcases.tgz")
|
||||
for format in gif jpg png bmp ico webp tif; do
|
||||
mkdir $format
|
||||
find afl_testcases -type f -name '*.'$format -exec mv -n {} $format/ \;
|
||||
zip -rj $format.zip $format/
|
||||
cp $format.zip "$OUT/encoder_${format}_fuzzer_seed_corpus.zip"
|
||||
done
|
||||
. Magick++/fuzz/build.sh
|
||||
|
|
Loading…
Reference in New Issue