diff options
author | Eliot Horowitz <eliot@10gen.com> | 2010-07-26 17:17:20 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2010-07-26 17:17:20 -0400 |
commit | a85b659bb6cc722a407e0fea6c39d2a523382a78 (patch) | |
tree | 121db2c9b985629f586aedb1d8b579504ed32c6d /SConstruct | |
parent | d3d978a60187894e6f148ea35a2c7ba2ab6c0345 (diff) | |
download | mongo-a85b659bb6cc722a407e0fea6c39d2a523382a78.tar.gz |
SERVER-1266 -Wl,as-needed flag for shared library
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct index 1e8806af578..f6989a6469d 100644 --- a/SConstruct +++ b/SConstruct @@ -745,6 +745,9 @@ if nix: env.Append( LINKFLAGS=" -fPIC -pthread -rdynamic" ) env.Append( LIBS=[] ) + if GetOption( "sharedclient" ): + env.Append( LINKFLAGS=" -Wl,--as-needed -Wl,-zdefs " ) + if debugBuild: env.Append( CPPFLAGS=" -O0 -fstack-protector " ); env['ENV']['GLIBCXX_FORCE_NEW'] = 1; # play nice with valgrind |