diff options
author | Mike Dirolf <mike@10gen.com> | 2010-07-27 10:37:48 -0400 |
---|---|---|
committer | Mike Dirolf <mike@10gen.com> | 2010-07-27 10:37:48 -0400 |
commit | d36e4b6e0b264b8ab187dcab519ecab5360de2cd (patch) | |
tree | 25a04c723ab45c063d096b3464690341f2ef264a | |
parent | 5b7ab6fa0ed3404bef3709d26a3c09850ef2f60d (diff) | |
download | mongo-d36e4b6e0b264b8ab187dcab519ecab5360de2cd.tar.gz |
add -Wl,--as-needed and -Wl,-zdefs only on linux
-rw-r--r-- | SConstruct | 2 | ||||
-rw-r--r-- | distsrc/client/SConstruct | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/SConstruct b/SConstruct index 9692791e356..e26a0994581 100644 --- a/SConstruct +++ b/SConstruct @@ -745,7 +745,7 @@ if nix: env.Append( LINKFLAGS=" -fPIC -pthread -rdynamic" ) env.Append( LIBS=[] ) - if GetOption( "sharedclient" ): + if linux and GetOption( "sharedclient" ): env.Append( LINKFLAGS=" -Wl,--as-needed -Wl,-zdefs " ) if debugBuild: diff --git a/distsrc/client/SConstruct b/distsrc/client/SConstruct index 59b47d922c2..7221a97420f 100644 --- a/distsrc/client/SConstruct +++ b/distsrc/client/SConstruct @@ -25,15 +25,18 @@ env.Append( CPPPATH=[ "mongo/" ] ) env.Append( CPPDEFINES=[ "_SCONS" , "MONGO_EXPOSE_MACROS" ] ) nix = False +linux = False if "darwin" == os.sys.platform: addExtraLibs( "/opt/local/" ) nix = True elif "linux2" == os.sys.platform: nix = True + linux = True if nix: env.Append( CPPFLAGS=" -O3" ) +if linux: env.Append( LINKFLAGS=" -Wl,--as-needed -Wl,-zdefs " ) boostLibs = [ "thread" , "filesystem" , "system" ] |