summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xSConstruct1
1 files changed, 1 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct
index ec74d699d..d84b91284 100755
--- a/SConstruct
+++ b/SConstruct
@@ -372,6 +372,7 @@ if main['GCC'] or main['CLANG']:
main.Append(CCFLAGS=['-I/usr/local/include'])
main.Append(CXXFLAGS=['-I/usr/local/include'])
+ main.Append(LINKFLAGS='-Wl,--as-needed')
main['FILTER_PSHLINKFLAGS'] = lambda x: str(x).replace(' -shared', '')
main['PSHLINKFLAGS'] = main.subst('${FILTER_PSHLINKFLAGS(SHLINKFLAGS)}')
if GetOption('gold_linker'):