1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00
samba-mirror/lib/fuzzing/wscript_build
Andrew Bartlett 92ee647858 lib/fuzzing: Use --fuzz-target-ldflags if specified
This makes integration with oss-fuzz possible.  Only the fuzzer binaries should be
linked with libFuzzer, not things like asn1_compile, so this can not be done via
the global ADDITIONAL_LDFLAGS.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Uri Simchoni <uri@samba.org>
2019-11-20 23:19:35 +00:00

43 lines
1.2 KiB
Python

#!/usr/bin/env python
bld.SAMBA_SUBSYSTEM('fuzzing',
source='fuzzing.c',
deps='talloc',
enabled=bld.env.enable_libfuzzer
)
bld.SAMBA_BINARY('fuzz_tiniparser',
source='fuzz_tiniparser.c',
deps='fuzzing tiniparser talloc',
fuzzer=True)
bld.SAMBA_BINARY('fuzz_oLschema2ldif',
source='fuzz_oLschema2ldif.c',
deps='fuzzing oLschema2ldif-lib',
fuzzer=True)
bld.SAMBA_BINARY('fuzz_reg_parse',
source='fuzz_reg_parse.c',
deps='fuzzing samba3-util smbconf REGFIO',
fuzzer=True)
bld.SAMBA_BINARY('fuzz_regfio',
source='fuzz_regfio.c',
deps='fuzzing samba3-util smbconf REGFIO',
fuzzer=True)
bld.SAMBA_BINARY('fuzz_lzxpress',
source='fuzz_lzxpress.c',
deps='fuzzing LZXPRESS',
fuzzer=True)
bld.SAMBA_BINARY('fuzz_ldap_decode',
source='fuzz_ldap_decode.c',
deps='fuzzing cli-ldap',
fuzzer=True)
bld.SAMBA_BINARY('fuzz_ldb_parse_tree',
source='fuzz_ldb_parse_tree.c',
deps='fuzzing ldb',
fuzzer=True)