diff options
-rw-r--r-- | SConstruct | 3 | ||||
-rwxr-xr-x | distsrc/client/SConstruct | 2 | ||||
-rw-r--r-- | src/SConscript.client | 5 |
3 files changed, 5 insertions, 5 deletions
diff --git a/SConstruct b/SConstruct index 0e21da381fb..b05f98029a0 100644 --- a/SConstruct +++ b/SConstruct @@ -743,9 +743,6 @@ if nix: except KeyError: pass - if linux and has_option( "sharedclient" ): - env.Append( SHLINKFLAGS=" -Wl,--as-needed -Wl,-zdefs " ) - if linux and has_option( "gcov" ): env.Append( CXXFLAGS=" -fprofile-arcs -ftest-coverage " ) env.Append( LINKFLAGS=" -fprofile-arcs -ftest-coverage " ) diff --git a/distsrc/client/SConstruct b/distsrc/client/SConstruct index ed95f0a639a..17fa954fc9d 100755 --- a/distsrc/client/SConstruct +++ b/distsrc/client/SConstruct @@ -80,7 +80,7 @@ else: if nix: env.Append(CCFLAGS=["-O3", "-pthread"]) if linux: - env.Append(LINKFLAGS=["-Wl,--as-needed", "-Wl,-zdefs", "-pthread"]) + env.Append(LINKFLAGS=["-pthread"]) boostLibs = ["thread", "filesystem", "system"] conf = Configure(env) diff --git a/src/SConscript.client b/src/SConscript.client index e26bae03f9e..99e020a2283 100644 --- a/src/SConscript.client +++ b/src/SConscript.client @@ -4,7 +4,7 @@ # programs. Import('env has_option installSetup use_system_version_of_library') -Import('nix darwin windows') +Import('nix linux darwin windows') buildShared = False if has_option("sharedclient"): @@ -196,6 +196,9 @@ if buildShared: # libraries as dependency terminals. LIBDEPS=mongoClientLibDeps) + if linux: + sharedLibEnv.AppendUnique(SHLINKFLAGS=["-Wl,--as-needed", "-Wl,-zdefs"]) + mongoClientSharedLib = sharedLibEnv.SharedLibrary('mongoclient', clientObjects) mongoClientSharedLibInstall = sharedLibEnv.Install( |