summaryrefslogtreecommitdiff
path: root/buildtools
diff options
context:
space:
mode:
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>2019-11-01 17:18:24 +1300
committerDouglas Bagnall <dbagnall@samba.org>2019-11-20 23:19:35 +0000
commitcb240510977e60fd46ef0f35b3da77f00733829a (patch)
tree45e10633842b1a69c4707784e2b3307fe3ceb568 /buildtools
parent9e51bb77f82292800c6f0c0563124954d8f0c524 (diff)
downloadsamba-cb240510977e60fd46ef0f35b3da77f00733829a.tar.gz
build: Set fuzzer=True on fuzzer binaries
This ensures that the binaries are the only binaries built when configured for fuzzing. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Uri Simchoni <uri@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'buildtools')
-rw-r--r--buildtools/wafsamba/wafsamba.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index 7081f382eaa..3e19b832e11 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -360,13 +360,24 @@ def SAMBA_BINARY(bld, binname, source,
subdir=None,
install=True,
install_path=None,
- enabled=True):
+ enabled=True,
+ fuzzer=False):
'''define a Samba binary'''
if not enabled:
SET_TARGET_TYPE(bld, binname, 'DISABLED')
return
+ # Fuzzing builds do not build normal binaries
+ # however we must build asn1compile etc
+
+ if not use_hostcc and bld.env.enable_libfuzzer != fuzzer:
+ SET_TARGET_TYPE(bld, binname, 'DISABLED')
+ return
+
+ if fuzzer:
+ install = False
+
if not SET_TARGET_TYPE(bld, binname, 'BINARY'):
return