diff options
author | Andy Schwerin <schwerin@10gen.com> | 2012-07-16 18:48:37 -0400 |
---|---|---|
committer | Andy Schwerin <schwerin@10gen.com> | 2012-07-17 13:10:04 -0400 |
commit | 78f93d7a3383b3eff72087f7b1a96930ddb59792 (patch) | |
tree | 95993eebb237c54ea07b99656e774cb000076081 | |
parent | da468fdddfeff6d7a22fd72a0a38a79e19eb61a3 (diff) | |
download | mongo-78f93d7a3383b3eff72087f7b1a96930ddb59792.tar.gz |
Link programs by linking all object files on the command line.
This is done rather than enumerating a list of static libraries to include.
SERVER-5112 and SERVER-6461
-rw-r--r-- | SConstruct | 2 | ||||
-rw-r--r-- | src/mongo/SConscript | 11 |
2 files changed, 6 insertions, 7 deletions
diff --git a/SConstruct b/SConstruct index 973a4835aee..221304a088c 100644 --- a/SConstruct +++ b/SConstruct @@ -302,6 +302,8 @@ env = Environment( BUILD_DIR=variantDir, CONFIGURELOG = scons_data_dir + '/config.log' ) +env['_LIBDEPS'] = '$_LIBDEPS_OBJS' + if has_option('mute'): env.Append( CCCOMSTR = "Compiling $TARGET" ) env.Append( CXXCOMSTR = env["CCCOMSTR"] ) diff --git a/src/mongo/SConscript b/src/mongo/SConscript index e88773330c0..2267b361437 100644 --- a/src/mongo/SConscript +++ b/src/mongo/SConscript @@ -403,8 +403,7 @@ env.StaticLibrary("coreserver", coreServerFiles, LIBDEPS=["mongocommon", "script mongod = env.Install( '#/', env.Program( "mongod", mongodOnlyFiles, LIBDEPS=["coreserver", "serveronly", "coredb", "ntservice", - "mongodandmongos"] + modules, - _LIBDEPS='$_LIBDEPS_OBJS' ) ) + "mongodandmongos"] + modules ) ) Default( mongod ) # tools @@ -434,15 +433,14 @@ env.Install( '#/', [ mongos = env.Program( "mongos", [ "s/server.cpp"] , LIBDEPS=["mongoscore", "coreserver", "coredb", "mongocommon", "coreshard", "dbcmdline", "ntservice", - "mongodandmongos"], - _LIBDEPS='$_LIBDEPS_OBJS') + "mongodandmongos"]) env.Install( '#/', mongos ) env.Library("clientandshell", ["client/clientAndShell.cpp"], LIBDEPS=["mongocommon", "defaultversion", "gridfs", "notmongodormongos"]) env.Library("allclient", "client/clientOnly.cpp", LIBDEPS=["clientandshell"]) if has_option( "sharedclient" ): - sharedClientLibName = str( env.SharedLibrary( "mongoclient", [], LIBDEPS=["allclient"], _LIBDEPS='$_LIBDEPS_OBJS' )[0] ) + sharedClientLibName = str( env.SharedLibrary( "mongoclient", [], LIBDEPS=["allclient"] )[0] ) # dbtests test binary env.StaticLibrary('testframework', ['dbtests/framework.cpp'], LIBDEPS=['unittest/unittest']) @@ -450,8 +448,7 @@ env.StaticLibrary('testframework', ['dbtests/framework.cpp'], LIBDEPS=['unittest test = testEnv.Install( '#/', testEnv.Program( "test", [ f for f in Glob( "dbtests/*.cpp" ) if not str( f ).endswith( 'framework.cpp' ) ], - LIBDEPS=["mongocommon", "serveronly", "coreserver", "coredb", "testframework", "gridfs", "notmongodormongos" ], - _LIBDEPS='$_LIBDEPS_OBJS' ) ) + LIBDEPS=["mongocommon", "serveronly", "coreserver", "coredb", "testframework", "gridfs", "notmongodormongos" ] ) ) if len(testEnv.subst('$PROGSUFFIX')): testEnv.Alias( "test", "#/${PROGPREFIX}test${PROGSUFFIX}" ) |