diff options
Diffstat (limited to 'lib/fuzzing/oss-fuzz/build_samba.sh')
-rwxr-xr-x | lib/fuzzing/oss-fuzz/build_samba.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/fuzzing/oss-fuzz/build_samba.sh b/lib/fuzzing/oss-fuzz/build_samba.sh new file mode 100755 index 00000000000..e5d85f7ba34 --- /dev/null +++ b/lib/fuzzing/oss-fuzz/build_samba.sh @@ -0,0 +1,21 @@ +#!/bin/sh -e + +# We have to push to oss-fuzz CFLAGS into the waf ADDITIONAL_CFLAGS +# as otherwise waf's configure fails linking the first test binary +ADDITIONAL_CFLAGS=$CFLAGS +export ADDITIONAL_CFLAGS +CFLAGS="" +export CFLAGS +LD=$CXX +export LD + +./configure -C --without-gettext --enable-debug --enable-developer \ + --address-sanitizer --enable-libfuzzer \ + --disable-warnings-as-errors \ + --abi-check-disable \ + --fuzz-target-ldflags=$LIB_FUZZING_ENGINE \ + --nonshared-binary=ALL LINK_CC=$CXX + +make -j + +cp bin/fuzz_* $OUT/ |