mirror of https://github.com/google/oss-fuzz.git
[zlib-ng] build fixes and improvements (#7467)
* [zlib-ng] fixed dataflow sanitizer build error. #7464 * [zlib-ng] use cmake instead of configure to build fuzzers.
This commit is contained in:
parent
4aeb753191
commit
1556fb10d6
|
@ -15,19 +15,26 @@
|
|||
#
|
||||
################################################################################
|
||||
|
||||
export LDSHARED=lld
|
||||
export LDFLAGS="$CFLAGS -stdlib=libc++"
|
||||
|
||||
./configure
|
||||
|
||||
sed -i 's/$(CC) $(LDFLAGS)/$(CXX) $(LDFLAGS)/g' Makefile
|
||||
|
||||
make -j$(nproc) clean
|
||||
make -j$(nproc) all
|
||||
make -j$(nproc) check
|
||||
: ${LD:="${CXX}"}
|
||||
: ${LDFLAGS:="${CXXFLAGS}"} # to make sure we link against 32-bit libraries
|
||||
|
||||
# Package seed corpus
|
||||
zip $OUT/seed_corpus.zip *.*
|
||||
for f in $(find . -name '*_fuzzer' -o -name 'fuzzer_*'); do
|
||||
|
||||
# Build project
|
||||
mkdir build && cd build
|
||||
cmake .. -DCMAKE_C_FLAGS="${CFLAGS}" \
|
||||
-DCMAKE_CXX_FLAGS="${CXXFLAGS}" \
|
||||
-DCMAKE_LINKER="${LD}" \
|
||||
-DCMAKE_SHARED_LINKER_FLAGS="${LDFLAGS}" \
|
||||
-DCMAKE_EXE_LINKER_FLAGS="${LDFLAGS}" \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DWITH_FUZZERS=ON
|
||||
make clean
|
||||
make -j $(nproc)
|
||||
|
||||
# Copy seed corpus for each fuzzer target
|
||||
for f in $(find . -type f -name 'fuzzer_*'); do
|
||||
cp -v $f $OUT
|
||||
(cd $OUT; ln -s seed_corpus.zip $(basename $f)_seed_corpus.zip)
|
||||
done
|
||||
|
|
|
@ -8,12 +8,10 @@ fuzzing_engines:
|
|||
- libfuzzer
|
||||
- afl
|
||||
- honggfuzz
|
||||
- dataflow
|
||||
sanitizers:
|
||||
- address
|
||||
- memory
|
||||
- undefined
|
||||
- dataflow
|
||||
architectures:
|
||||
- x86_64
|
||||
- i386
|
||||
|
|
Loading…
Reference in New Issue