From 6b9018d3c98113c6984a1fe65cce42771ccb4600 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Tue, 6 Sep 2022 08:47:47 +0200 Subject: [PATCH] waf: Do not use as-needed if we build with Address Sanitizer https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98669 Signed-off-by: Andreas Schneider Reviewed-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- wscript | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wscript b/wscript index 3af4207516d..5e775ebd2dd 100644 --- 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"): -- 2.47.3