waf: Use waf function to add for -Wl,--as-needed
authorAndreas Schneider <asn@samba.org>
Mon, 23 Sep 2019 15:21:51 +0000 (17:21 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 25 Sep 2019 16:56:39 +0000 (16:56 +0000)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Matthias Dieter Wallnöfer <mdw@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Sep 25 16:56:40 UTC 2019 on sn-devel-184

wscript

diff --git a/wscript b/wscript
index 3e04df040804fd8332b4973aaf6a5a436c3cffb0..a195ac33c985b1678c74735db27f188a35912e7c 100644 (file)
--- a/wscript
+++ b/wscript
@@ -321,7 +321,7 @@ def configure(conf):
     # allows us to find problems on our development hosts faster.
     # It also results in faster load time.
 
-    conf.env.asneeded_ldflags = conf.ADD_LDFLAGS('-Wl,--as-needed', testflags=True)
+    conf.add_as_needed()
 
     if not conf.CHECK_NEED_LC("-lc not needed"):
         conf.ADD_LDFLAGS('-lc', testflags=False)