diff options
-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" ] |