diff options
Diffstat (limited to 'src/mongo')
-rw-r--r-- | src/mongo/SConscript | 45 | ||||
-rw-r--r-- | src/mongo/installer/msi/ca/SConscript | 2 | ||||
-rw-r--r-- | src/mongo/shell/SConscript | 5 | ||||
-rw-r--r-- | src/mongo/unittest/SConscript | 2 | ||||
-rw-r--r-- | src/mongo/util/SConscript | 41 |
5 files changed, 45 insertions, 50 deletions
diff --git a/src/mongo/SConscript b/src/mongo/SConscript index 6c92d1ebe64..2bdf4408967 100644 --- a/src/mongo/SConscript +++ b/src/mongo/SConscript @@ -59,7 +59,32 @@ baseEnv = env.Clone() if use_libunwind == True: baseEnv.InjectThirdParty('unwind') -stacktrace_impl_cpp = [ File('util/stacktrace_${TARGET_OS_FAMILY}.cpp') ] +quick_exit_env = baseEnv.Clone() +if has_option('gcov'): + quick_exit_env.Append( + CPPDEFINES=[ + 'MONGO_GCOV', + ], + ) +quick_exit_obj = baseEnv.LibraryObject( + target='quick_exit', + source=[ + 'util/quick_exit.cpp', + ], +)[0] + +debugger_env = baseEnv.Clone() +if has_option("gdbserver"): + debugger_env.Append(CPPDEFINES=["USE_GDBSERVER"]) +elif has_option("lldb-server"): + debugger_env.Append(CPPDEFINES=["USE_LLDB_SERVER"]) + +debugger_obj = debugger_env.LibraryObject( + target='debugger', + source=[ + 'util/debugger.cpp', + ], +)[0] baseEnv.Library( target='base', @@ -119,9 +144,9 @@ baseEnv.Library( 'logv2/log_tag.cpp', 'logv2/log_util.cpp', 'logv2/plain_formatter.cpp', - 'logv2/shared_access_fstream.cpp', 'logv2/ramlog.cpp', 'logv2/redaction.cpp', + 'logv2/shared_access_fstream.cpp', 'logv2/text_formatter.cpp', 'platform/decimal128.cpp', 'platform/mutex.cpp', @@ -141,7 +166,6 @@ baseEnv.Library( 'util/concurrency/idle_thread_block.cpp', 'util/concurrency/thread_name.cpp', 'util/duration.cpp', - 'util/str_escape.cpp', 'util/errno_util.cpp', 'util/exception_filter_win32.cpp', 'util/exit.cpp', @@ -156,33 +180,33 @@ baseEnv.Library( 'util/stacktrace_somap.cpp', 'util/stacktrace_threads.cpp', 'util/str.cpp', + 'util/str_escape.cpp', 'util/system_clock_source.cpp', 'util/system_tick_source.cpp', - 'util/text.cpp', 'util/testing_proctor.cpp', + 'util/text.cpp', 'util/thread_safety_context.cpp', 'util/time_support.cpp', 'util/timer.cpp', 'util/uuid.cpp', 'util/version.cpp', + debugger_obj, + quick_exit_obj, ], # NOTE: This library *must not* depend on any libraries than # the ones declared here. Do not add to this list. LIBDEPS=[ '$BUILD_DIR/third_party/murmurhash3/murmurhash3', '$BUILD_DIR/third_party/shim_abseil', - '$BUILD_DIR/third_party/shim_allocator', '$BUILD_DIR/third_party/shim_boost', '$BUILD_DIR/third_party/shim_fmt', + ], + LIBDEPS_PRIVATE=[ '$BUILD_DIR/third_party/shim_intel_decimal128', '$BUILD_DIR/third_party/shim_pcrecpp', '$BUILD_DIR/third_party/shim_unwind' if use_libunwind else [], 'boost_assert_shim', 'stdx/stdx', - 'util/quick_exit', - ], - LIBDEPS_PRIVATE=[ - 'util/debugger', ], AIB_COMPONENT='platform', ) @@ -363,7 +387,6 @@ mongod = env.Program( # mongod_initializers. 'base', 'mongod_main', - 'util/quick_exit', ], AIB_COMPONENT="mongod", AIB_COMPONENTS_EXTRA=[ @@ -640,7 +663,6 @@ mongos = env.Program( # mongos_initializers. 'base', 'mongos_main', - 'util/quick_exit' ], AIB_COMPONENT="mongos", AIB_COMPONENTS_EXTRA=[ @@ -875,6 +897,7 @@ if not has_option('noshell') and usemozjs: # library to inject a static or mongo initializer to mongo, # please add that library as a private libdep of # mongo_initializers. + "$BUILD_DIR/third_party/shim_pcrecpp", "mongo_initializers", "shell/linenoise", "shell/shell_utils", diff --git a/src/mongo/installer/msi/ca/SConscript b/src/mongo/installer/msi/ca/SConscript index 70d4a58561f..8530a9a7534 100644 --- a/src/mongo/installer/msi/ca/SConscript +++ b/src/mongo/installer/msi/ca/SConscript @@ -32,4 +32,6 @@ ca = env.SharedLibrary( ], # We don't want the usual auto install rules to apply to this file. AIB_IGNORE=True, + # We don't want any special allocator here either. + DISABLE_ALLOCATOR_SHIM_INJECTION=True, ) diff --git a/src/mongo/shell/SConscript b/src/mongo/shell/SConscript index bdf17c86167..63b49250018 100644 --- a/src/mongo/shell/SConscript +++ b/src/mongo/shell/SConscript @@ -17,7 +17,10 @@ env.Library( '$BUILD_DIR/mongo/client/clientdriver_minimal', '$BUILD_DIR/mongo/db/logical_session_id', '$BUILD_DIR/mongo/scripting/bson_template_evaluator', - ] + ], + LIBDEPS_PRIVATE=[ + '$BUILD_DIR/third_party/shim_pcrecpp', + ], ) generateJSErrorCodes = env.Command( diff --git a/src/mongo/unittest/SConscript b/src/mongo/unittest/SConscript index 517a1de6997..f0eb8f5e9d5 100644 --- a/src/mongo/unittest/SConscript +++ b/src/mongo/unittest/SConscript @@ -17,11 +17,11 @@ env.Library( ], LIBDEPS=[ '$BUILD_DIR/mongo/base', + '$BUILD_DIR/third_party/shim_pcrecpp', ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/server_options_core', '$BUILD_DIR/mongo/util/options_parser/options_parser', - '$BUILD_DIR/mongo/util/debugger', ], ) diff --git a/src/mongo/util/SConscript b/src/mongo/util/SConscript index dd5edaf76c8..ee6802326ee 100644 --- a/src/mongo/util/SConscript +++ b/src/mongo/util/SConscript @@ -60,27 +60,10 @@ env.Library( ], LIBDEPS=[ '$BUILD_DIR/mongo/base', + '$BUILD_DIR/third_party/shim_pcrecpp', ], ) -debuggerEnv = env.Clone() -if has_option("gdbserver"): - debuggerEnv.Append(CPPDEFINES=["USE_GDBSERVER"]) -elif has_option("lldb-server"): - debuggerEnv.Append(CPPDEFINES=["USE_LLDB_SERVER"]) - -debuggerEnv.Library( - target='debugger', - source=[ - 'debugger.cpp', - ], - LIBDEPS=[ - # NOTE: You *must not* add any library dependencies to the debugger library - ], - LIBDEPS_TAGS=[ - 'init-no-global-side-effects', - ] -) env.Library( target='summation', @@ -142,6 +125,9 @@ env.Library( LIBDEPS=[ "$BUILD_DIR/mongo/base", ], + LIBDEPS_PRIVATE=[ + '$BUILD_DIR/third_party/shim_pcrecpp', + ], ) env.Library( @@ -357,25 +343,6 @@ env.Library( ], ) -quick_exit_env = env.Clone() -if has_option('gcov'): - quick_exit_env.Append( - CPPDEFINES=[ - 'MONGO_GCOV', - ], - ) - -quick_exit_env.Library( - target='quick_exit', - source=[ - 'quick_exit.cpp', - ], - LIBDEPS=[ - # NOTE: You *must not* add any other library dependencies to - # the quick_exit library - "$BUILD_DIR/third_party/shim_allocator", - ] -) env.Library( target="secure_compare_memory", source=[ |