]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
waf: Do not use as-needed if we build with Address Sanitizer
authorAndreas Schneider <asn@samba.org>
Tue, 6 Sep 2022 06:47:47 +0000 (08:47 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 8 Sep 2022 22:34:36 +0000 (22:34 +0000)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98669

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
wscript

diff --git a/wscript b/wscript
index 3af4207516daf4605a5cac3a0f54a053082838e7..5e775ebd2dd0783e32876d0d5ab411967eb4d8fa 100644 (file)
--- a/wscript
+++ b/wscript
@@ -362,7 +362,8 @@ def configure(conf):
     # allows us to find problems on our development hosts faster.
     # It also results in faster load time.
 
-    if conf.CHECK_LDFLAGS('-Wl,--as-needed'):
+    if (not Options.options.address_sanitizer
+        and conf.CHECK_LDFLAGS('-Wl,--as-needed')):
         conf.env.append_unique('LINKFLAGS', '-Wl,--as-needed')
 
     if not conf.CHECK_NEED_LC("-lc not needed"):