summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/SConscript32
-rw-r--r--src/mongo/SConscript12
-rw-r--r--src/mongo/base/SConscript2
-rw-r--r--src/mongo/bson/SConscript5
-rw-r--r--src/mongo/bson/mutable/SConscript2
-rw-r--r--src/mongo/bson/util/SConscript2
-rw-r--r--src/mongo/client/SConscript6
-rw-r--r--src/mongo/crypto/SConscript5
-rw-r--r--src/mongo/crypto/tom/SConscript2
-rw-r--r--src/mongo/db/SConscript11
-rw-r--r--src/mongo/db/auth/SConscript2
-rw-r--r--src/mongo/db/bson/SConscript2
-rw-r--r--src/mongo/db/catalog/SConscript2
-rw-r--r--src/mongo/db/commands/SConscript2
-rw-r--r--src/mongo/db/concurrency/SConscript2
-rw-r--r--src/mongo/db/exec/SConscript2
-rw-r--r--src/mongo/db/ftdc/SConscript2
-rw-r--r--src/mongo/db/fts/SConscript5
-rw-r--r--src/mongo/db/fts/unicode/SConscript2
-rw-r--r--src/mongo/db/geo/SConscript4
-rw-r--r--src/mongo/db/index/SConscript2
-rw-r--r--src/mongo/db/matcher/SConscript2
-rw-r--r--src/mongo/db/ops/SConscript2
-rw-r--r--src/mongo/db/pipeline/SConscript2
-rw-r--r--src/mongo/db/query/SConscript5
-rw-r--r--src/mongo/db/repl/SConscript2
-rw-r--r--src/mongo/db/s/SConscript2
-rw-r--r--src/mongo/db/sorter/SConscript2
-rw-r--r--src/mongo/db/stats/SConscript2
-rw-r--r--src/mongo/db/storage/SConscript5
-rw-r--r--src/mongo/db/storage/devnull/SConscript2
-rw-r--r--src/mongo/db/storage/ephemeral_for_test/SConscript2
-rw-r--r--src/mongo/db/storage/kv/SConscript2
-rw-r--r--src/mongo/db/storage/mmap_v1/SConscript2
-rw-r--r--src/mongo/db/storage/wiredtiger/SConscript2
-rw-r--r--src/mongo/db/views/SConscript2
-rw-r--r--src/mongo/dbtests/SConscript2
-rw-r--r--src/mongo/executor/SConscript2
-rw-r--r--src/mongo/installer/SConscript5
-rw-r--r--src/mongo/installer/msi/SConscript1
-rw-r--r--src/mongo/logger/SConscript2
-rw-r--r--src/mongo/platform/SConscript2
-rw-r--r--src/mongo/rpc/SConscript2
-rw-r--r--src/mongo/s/SConscript5
-rw-r--r--src/mongo/s/catalog/SConscript2
-rw-r--r--src/mongo/s/client/SConscript2
-rw-r--r--src/mongo/s/commands/SConscript2
-rw-r--r--src/mongo/s/query/SConscript2
-rw-r--r--src/mongo/s/write_ops/SConscript2
-rw-r--r--src/mongo/shell/SConscript2
-rw-r--r--src/mongo/tools/SConscript2
-rw-r--r--src/mongo/transport/SConscript2
-rw-r--r--src/mongo/unittest/SConscript2
-rw-r--r--src/mongo/util/SConscript5
-rw-r--r--src/mongo/util/cmdline_utils/SConscript2
-rw-r--r--src/mongo/util/concurrency/SConscript2
-rw-r--r--src/mongo/util/net/SConscript2
-rw-r--r--src/mongo/util/options_parser/SConscript2
-rw-r--r--src/third_party/IntelRDFPMathLib20U1/SConscript1
-rw-r--r--src/third_party/SConscript3
-rw-r--r--src/third_party/asio-asio-1-11-0/SConscript2
-rw-r--r--src/third_party/boost-1.60.0/SConscript2
-rw-r--r--src/third_party/gperftools-2.5/SConscript2
-rw-r--r--src/third_party/libstemmer_c/SConscript2
-rw-r--r--src/third_party/mozjs-45/SConscript2
-rw-r--r--src/third_party/murmurhash3/SConscript2
-rw-r--r--src/third_party/pcre-8.39/SConscript1
-rw-r--r--src/third_party/s2/SConscript17
-rw-r--r--src/third_party/tz/SConscript2
-rw-r--r--src/third_party/wiredtiger/SConscript1
-rw-r--r--src/third_party/zlib-1.2.8/SConscript1
71 files changed, 203 insertions, 29 deletions
diff --git a/src/SConscript b/src/SConscript
index 2dc6110008d..f12d13a6e41 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -3,13 +3,25 @@
# This is the principle SConscript file, invoked by the SConstruct. Its job is
# to delegate to any and all per-module SConscript files.
-Import('env module_sconscripts')
-
-env.SConscript(
- [
- # NOTE: We must do third_party first as it adds methods to the environment
- # that we need in the mongo sconscript
- 'third_party/SConscript',
- 'mongo/SConscript',
- ] + module_sconscripts
-)
+Import('env')
+Import('module_sconscripts')
+
+# NOTE: We must do third_party first as it adds methods to the environment
+# that we need in the mongo sconscript
+env = env.Clone()
+env.SConscript('third_party/SConscript', exports=['env'])
+
+# Inject boost and pcre from third_party globally for all core mongo code
+# and modules. Ideally, pcre wouldn't be here, but enough things require it
+# now that it seems hopeless to remove it now.
+env = env.Clone()
+env.InjectThirdPartyIncludePaths(libraries=[
+ 'boost',
+ 'pcre',
+])
+
+# Run the core mongodb SConscript.
+env.SConscript('mongo/SConscript', exports=['env'])
+
+# Run SConscripts for any modules in play
+env.SConscript(module_sconscripts, exports=['env'])
diff --git a/src/mongo/SConscript b/src/mongo/SConscript
index f465436ac01..d7f86aa027a 100644
--- a/src/mongo/SConscript
+++ b/src/mongo/SConscript
@@ -14,13 +14,8 @@ Import("get_option")
Import("usemozjs")
Import("use_system_version_of_library")
-# Boost we need everywhere. 's2' is spammed in all over the place by
-# db/geo unfortunately. pcre is also used many places.
-env.InjectThirdPartyIncludePaths(libraries=[
- 'boost',
- 'pcre',
- 's2',
-])
+env = env.Clone()
+
env.InjectMongoIncludePaths()
env.SConscript(
@@ -44,6 +39,9 @@ env.SConscript(
'unittest',
'util',
],
+ exports=[
+ 'env',
+ ],
)
# NOTE: This library does not really belong here. Its presence here is
diff --git a/src/mongo/base/SConscript b/src/mongo/base/SConscript
index ad7ab191d97..848aca3b7f0 100644
--- a/src/mongo/base/SConscript
+++ b/src/mongo/base/SConscript
@@ -2,6 +2,8 @@
Import("env")
+env = env.Clone()
+
generateErrorCodes = env.Command(
target=['error_codes.h', 'error_codes.cpp'],
source=['generate_error_codes.py', 'error_codes.err'],
diff --git a/src/mongo/bson/SConscript b/src/mongo/bson/SConscript
index d2f20e3fc1c..a32f7795da2 100644
--- a/src/mongo/bson/SConscript
+++ b/src/mongo/bson/SConscript
@@ -2,11 +2,16 @@
Import('env')
+env = env.Clone()
+
env.SConscript(
dirs=[
'mutable',
'util',
],
+ exports=[
+ 'env',
+ ],
)
env.CppUnitTest(
diff --git a/src/mongo/bson/mutable/SConscript b/src/mongo/bson/mutable/SConscript
index cbad6d15552..a9054d6c6de 100644
--- a/src/mongo/bson/mutable/SConscript
+++ b/src/mongo/bson/mutable/SConscript
@@ -2,6 +2,8 @@
Import('env')
+env = env.Clone()
+
env.Library(
target='mutable_bson',
source=[
diff --git a/src/mongo/bson/util/SConscript b/src/mongo/bson/util/SConscript
index 6c8ce51e012..4e589e7aa6e 100644
--- a/src/mongo/bson/util/SConscript
+++ b/src/mongo/bson/util/SConscript
@@ -2,6 +2,8 @@
Import('env')
+env = env.Clone()
+
env.Library(
target='bson_extract',
source=[
diff --git a/src/mongo/client/SConscript b/src/mongo/client/SConscript
index e058a42b225..73595927526 100644
--- a/src/mongo/client/SConscript
+++ b/src/mongo/client/SConscript
@@ -2,6 +2,8 @@
Import('env')
+env = env.Clone()
+
# Contains only the core ConnectionString functionality, *not* the ability to call connect()
# and return a DBClientBase* back. For that you need to link against the 'clientdriver' library.
env.Library(
@@ -129,8 +131,10 @@ env.Library(
],
)
+clientDriverEnv = env.Clone()
+clientDriverEnv.InjectThirdPartyIncludePaths('asio')
-env.Library(
+clientDriverEnv.Library(
target='clientdriver',
source=[
'connection_string_connect.cpp',
diff --git a/src/mongo/crypto/SConscript b/src/mongo/crypto/SConscript
index f66e88be2b3..7d2aae22ce9 100644
--- a/src/mongo/crypto/SConscript
+++ b/src/mongo/crypto/SConscript
@@ -2,10 +2,15 @@
Import("env")
+env = env.Clone()
+
env.SConscript(
dirs=[
'tom',
],
+ exports=[
+ 'env',
+ ],
)
env.Library('crypto_tom',
diff --git a/src/mongo/crypto/tom/SConscript b/src/mongo/crypto/tom/SConscript
index 6217f442e6f..66c9f43e2ee 100644
--- a/src/mongo/crypto/tom/SConscript
+++ b/src/mongo/crypto/tom/SConscript
@@ -2,6 +2,8 @@
Import("env")
+env = env.Clone()
+
env.Library('tomcrypt',
['crypt_argchk.c',
'crypt_find_hash.c',
diff --git a/src/mongo/db/SConscript b/src/mongo/db/SConscript
index b3743ceca4d..03bb3b22330 100644
--- a/src/mongo/db/SConscript
+++ b/src/mongo/db/SConscript
@@ -4,6 +4,14 @@ Import("env")
Import("has_option")
Import("wiredtiger")
+env = env.Clone()
+
+# Ideally 's2' would be scoped narrowly but it is spammed in all over the place by
+# db/geo unfortunately.
+env.InjectThirdPartyIncludePaths(libraries=[
+ 's2',
+])
+
env.SConscript(
dirs=[
'auth',
@@ -27,6 +35,9 @@ env.SConscript(
'storage',
'views',
],
+ exports=[
+ 'env',
+ ],
)
#
diff --git a/src/mongo/db/auth/SConscript b/src/mongo/db/auth/SConscript
index 51f465a9702..1e3adb6587a 100644
--- a/src/mongo/db/auth/SConscript
+++ b/src/mongo/db/auth/SConscript
@@ -2,6 +2,8 @@
Import("env")
+env = env.Clone()
+
env.Library('serverauth', ['mongo_authentication_session.cpp'])
generateActionTypes = env.Command(
diff --git a/src/mongo/db/bson/SConscript b/src/mongo/db/bson/SConscript
index 38c42957046..e021674662f 100644
--- a/src/mongo/db/bson/SConscript
+++ b/src/mongo/db/bson/SConscript
@@ -2,6 +2,8 @@
Import("env")
+env = env.Clone()
+
env.Library(
target="dotted_path_support",
source=[
diff --git a/src/mongo/db/catalog/SConscript b/src/mongo/db/catalog/SConscript
index a5f7bb1f68b..f5c744a7592 100644
--- a/src/mongo/db/catalog/SConscript
+++ b/src/mongo/db/catalog/SConscript
@@ -2,6 +2,8 @@
Import("env")
+env = env.Clone()
+
env.Library('collection_options', ['collection_options.cpp'], LIBDEPS=['$BUILD_DIR/mongo/base'])
env.CppUnitTest('collection_options_test', ['collection_options_test.cpp'],
diff --git a/src/mongo/db/commands/SConscript b/src/mongo/db/commands/SConscript
index cc535fc4fe5..59d1b2b0587 100644
--- a/src/mongo/db/commands/SConscript
+++ b/src/mongo/db/commands/SConscript
@@ -3,6 +3,8 @@
Import("env")
Import("has_option")
+env = env.Clone()
+
env.Library(
target="test_commands_enabled",
source=[
diff --git a/src/mongo/db/concurrency/SConscript b/src/mongo/db/concurrency/SConscript
index c823280f415..16a254db7aa 100644
--- a/src/mongo/db/concurrency/SConscript
+++ b/src/mongo/db/concurrency/SConscript
@@ -2,6 +2,8 @@
Import("env")
+env = env.Clone()
+
env.Library(
target='write_conflict_exception',
source=[
diff --git a/src/mongo/db/exec/SConscript b/src/mongo/db/exec/SConscript
index 2d7e2368972..25f205ccf22 100644
--- a/src/mongo/db/exec/SConscript
+++ b/src/mongo/db/exec/SConscript
@@ -2,6 +2,8 @@
Import("env")
+env = env.Clone()
+
# WorkingSet target and associated test
env.Library(
target = "working_set",
diff --git a/src/mongo/db/ftdc/SConscript b/src/mongo/db/ftdc/SConscript
index 0d16aec93f2..2eed967e48a 100644
--- a/src/mongo/db/ftdc/SConscript
+++ b/src/mongo/db/ftdc/SConscript
@@ -1,6 +1,8 @@
# -*- mode: python -*-
Import("env")
+env = env.Clone()
+
ftdcEnv = env.Clone()
ftdcEnv.InjectThirdPartyIncludePaths(libraries=['zlib'])
diff --git a/src/mongo/db/fts/SConscript b/src/mongo/db/fts/SConscript
index 45268af4500..4118f0f738f 100644
--- a/src/mongo/db/fts/SConscript
+++ b/src/mongo/db/fts/SConscript
@@ -2,10 +2,15 @@
Import("env")
+env = env.Clone()
+
env.SConscript(
dirs=[
'unicode',
],
+ exports=[
+ 'env',
+ ],
)
stop_word_languages = [
diff --git a/src/mongo/db/fts/unicode/SConscript b/src/mongo/db/fts/unicode/SConscript
index dc9980ec50d..32ad0b92417 100644
--- a/src/mongo/db/fts/unicode/SConscript
+++ b/src/mongo/db/fts/unicode/SConscript
@@ -2,6 +2,8 @@
Import("env")
+env = env.Clone()
+
env.Command(
target="codepoints_casefold.cpp",
source=[
diff --git a/src/mongo/db/geo/SConscript b/src/mongo/db/geo/SConscript
index ca2d94c7349..83a185ec13c 100644
--- a/src/mongo/db/geo/SConscript
+++ b/src/mongo/db/geo/SConscript
@@ -2,6 +2,8 @@
Import("env")
+env = env.Clone()
+
# Core geometry shape libraries
env.Library("geometry", [ "hash.cpp",
"shapes.cpp",
@@ -34,4 +36,4 @@ env.CppUnitTest("r2_region_coverer_test", [ "r2_region_coverer_test.cpp" ],
env.CppUnitTest("big_polygon_test", [ "big_polygon_test.cpp" ],
LIBDEPS = [ "geometry",
- "$BUILD_DIR/mongo/db/common" ]) # db/common needed for field parsing \ No newline at end of file
+ "$BUILD_DIR/mongo/db/common" ]) # db/common needed for field parsing
diff --git a/src/mongo/db/index/SConscript b/src/mongo/db/index/SConscript
index 9bef163eead..ed19eb7a309 100644
--- a/src/mongo/db/index/SConscript
+++ b/src/mongo/db/index/SConscript
@@ -2,6 +2,8 @@
Import("env")
+env = env.Clone()
+
env.Library(
target='index_descriptor',
source=[
diff --git a/src/mongo/db/matcher/SConscript b/src/mongo/db/matcher/SConscript
index 90fb6d5d3e0..7400ccc5726 100644
--- a/src/mongo/db/matcher/SConscript
+++ b/src/mongo/db/matcher/SConscript
@@ -2,6 +2,8 @@
Import('env')
+env = env.Clone()
+
env.Library(
target='path',
source=[
diff --git a/src/mongo/db/ops/SConscript b/src/mongo/db/ops/SConscript
index 78ba7a0c635..e12773a310e 100644
--- a/src/mongo/db/ops/SConscript
+++ b/src/mongo/db/ops/SConscript
@@ -2,6 +2,8 @@
Import("env")
+env = env.Clone()
+
env.Library(
target='update_common',
source=[
diff --git a/src/mongo/db/pipeline/SConscript b/src/mongo/db/pipeline/SConscript
index ac7ab097c07..469573b7304 100644
--- a/src/mongo/db/pipeline/SConscript
+++ b/src/mongo/db/pipeline/SConscript
@@ -2,6 +2,8 @@
Import('env')
+env = env.Clone()
+
env.Library(
target='aggregation',
source=[
diff --git a/src/mongo/db/query/SConscript b/src/mongo/db/query/SConscript
index a6c14a5f7dc..e1d369726f1 100644
--- a/src/mongo/db/query/SConscript
+++ b/src/mongo/db/query/SConscript
@@ -2,10 +2,15 @@
Import("env")
+env = env.Clone()
+
env.SConscript(
dirs=[
"collation",
],
+ exports=[
+ 'env'
+ ],
)
env.Library(
diff --git a/src/mongo/db/repl/SConscript b/src/mongo/db/repl/SConscript
index b11f2900c45..6f4cca50e8f 100644
--- a/src/mongo/db/repl/SConscript
+++ b/src/mongo/db/repl/SConscript
@@ -2,6 +2,8 @@
Import("env")
+env = env.Clone()
+
env.Library(
target='bgsync',
source=[
diff --git a/src/mongo/db/s/SConscript b/src/mongo/db/s/SConscript
index 56f488adc42..dfbce3752df 100644
--- a/src/mongo/db/s/SConscript
+++ b/src/mongo/db/s/SConscript
@@ -2,6 +2,8 @@
Import("env")
+env = env.Clone()
+
env.Library(
target='metadata',
source=[
diff --git a/src/mongo/db/sorter/SConscript b/src/mongo/db/sorter/SConscript
index 365c1a91f54..f7644672a99 100644
--- a/src/mongo/db/sorter/SConscript
+++ b/src/mongo/db/sorter/SConscript
@@ -1,5 +1,7 @@
Import("env")
+env = env.Clone()
+
sorterEnv = env.Clone()
sorterEnv.InjectThirdPartyIncludePaths(libraries=['snappy'])
sorterEnv.CppUnitTest('sorter_test',
diff --git a/src/mongo/db/stats/SConscript b/src/mongo/db/stats/SConscript
index 6a9459c1b37..3bd923f64b1 100644
--- a/src/mongo/db/stats/SConscript
+++ b/src/mongo/db/stats/SConscript
@@ -2,6 +2,8 @@
Import("env")
+env = env.Clone()
+
env.Library(
target='timer_stats',
source=[
diff --git a/src/mongo/db/storage/SConscript b/src/mongo/db/storage/SConscript
index 367471e186b..0c23b901517 100644
--- a/src/mongo/db/storage/SConscript
+++ b/src/mongo/db/storage/SConscript
@@ -1,6 +1,8 @@
# -*- mode: python -*-
Import("env")
+env = env.Clone()
+
env.SConscript(
dirs=[
'devnull',
@@ -9,6 +11,9 @@ env.SConscript(
'mmap_v1',
'wiredtiger',
],
+ exports=[
+ 'env'
+ ],
)
diff --git a/src/mongo/db/storage/devnull/SConscript b/src/mongo/db/storage/devnull/SConscript
index d9a53b3834f..a11aad58065 100644
--- a/src/mongo/db/storage/devnull/SConscript
+++ b/src/mongo/db/storage/devnull/SConscript
@@ -2,6 +2,8 @@
Import("env")
+env = env.Clone()
+
env.Library(
target='storage_devnull_core',
source=[
diff --git a/src/mongo/db/storage/ephemeral_for_test/SConscript b/src/mongo/db/storage/ephemeral_for_test/SConscript
index c3ec899e74a..8a9e813b443 100644
--- a/src/mongo/db/storage/ephemeral_for_test/SConscript
+++ b/src/mongo/db/storage/ephemeral_for_test/SConscript
@@ -1,6 +1,8 @@
# -*- mode: python -*-
Import("env")
+env = env.Clone()
+
env.Library(
target= 'ephemeral_for_test_record_store',
source= [
diff --git a/src/mongo/db/storage/kv/SConscript b/src/mongo/db/storage/kv/SConscript
index 9da8daf10c5..47217f149fe 100644
--- a/src/mongo/db/storage/kv/SConscript
+++ b/src/mongo/db/storage/kv/SConscript
@@ -2,6 +2,8 @@
Import("env")
+env = env.Clone()
+
# Should not be referenced outside this SConscript file.
env.Library(
target='kv_engine_core',
diff --git a/src/mongo/db/storage/mmap_v1/SConscript b/src/mongo/db/storage/mmap_v1/SConscript
index cfb507c80d7..6f262a71a46 100644
--- a/src/mongo/db/storage/mmap_v1/SConscript
+++ b/src/mongo/db/storage/mmap_v1/SConscript
@@ -3,6 +3,8 @@
Import("env")
Import("mmapv1")
+env = env.Clone()
+
env.Library(
target = 'storage_mmapv1',
source = [ "aligned_builder.cpp",
diff --git a/src/mongo/db/storage/wiredtiger/SConscript b/src/mongo/db/storage/wiredtiger/SConscript
index 7666800726f..4fe3322a14a 100644
--- a/src/mongo/db/storage/wiredtiger/SConscript
+++ b/src/mongo/db/storage/wiredtiger/SConscript
@@ -3,6 +3,8 @@ Import("env")
Import("wiredtiger")
Import("get_option")
+env = env.Clone()
+
using_ubsan = False
sanitizer_list = get_option('sanitize')
if sanitizer_list:
diff --git a/src/mongo/db/views/SConscript b/src/mongo/db/views/SConscript
index fc5ba8b83a1..a5a2512a2c6 100644
--- a/src/mongo/db/views/SConscript
+++ b/src/mongo/db/views/SConscript
@@ -2,6 +2,8 @@
Import("env")
+env = env.Clone()
+
env.Library(
target='views_mongod',
source=[
diff --git a/src/mongo/dbtests/SConscript b/src/mongo/dbtests/SConscript
index 0c8b8d30964..c2de92ab9a3 100644
--- a/src/mongo/dbtests/SConscript
+++ b/src/mongo/dbtests/SConscript
@@ -2,6 +2,8 @@
Import("env")
+env = env.Clone()
+
env.Library(
target="framework_options",
source=[
diff --git a/src/mongo/executor/SConscript b/src/mongo/executor/SConscript
index 000d751ecde..7b2707464d2 100644
--- a/src/mongo/executor/SConscript
+++ b/src/mongo/executor/SConscript
@@ -2,6 +2,8 @@
Import("env")
+env = env.Clone()
+
env.InjectThirdPartyIncludePaths('asio')
env.Library(
diff --git a/src/mongo/installer/SConscript b/src/mongo/installer/SConscript
index 841d4841626..97f76f9c5d5 100644
--- a/src/mongo/installer/SConscript
+++ b/src/mongo/installer/SConscript
@@ -2,8 +2,13 @@
Import("env")
+env = env.Clone()
+
env.SConscript(
dirs=[
'msi',
],
+ exports=[
+ 'env',
+ ],
)
diff --git a/src/mongo/installer/msi/SConscript b/src/mongo/installer/msi/SConscript
index fe0ff935a0b..563779cf5f4 100644
--- a/src/mongo/installer/msi/SConscript
+++ b/src/mongo/installer/msi/SConscript
@@ -6,6 +6,7 @@ Import("env")
Import("has_option")
env = env.Clone()
+
env['WIX'] = os.environ.get('WIX')
env['WIXPATH'] = r'$WIX\bin'
env['WIXHEAT'] = r'$WIXPATH\heat.exe'
diff --git a/src/mongo/logger/SConscript b/src/mongo/logger/SConscript
index d1d5be5831b..644fef1e105 100644
--- a/src/mongo/logger/SConscript
+++ b/src/mongo/logger/SConscript
@@ -2,6 +2,8 @@
Import("env")
+env = env.Clone()
+
env.Library(
target=[
'max_log_size'
diff --git a/src/mongo/platform/SConscript b/src/mongo/platform/SConscript
index 3d8bca0b958..a1b1e9ae134 100644
--- a/src/mongo/platform/SConscript
+++ b/src/mongo/platform/SConscript
@@ -2,6 +2,8 @@
Import("env")
+env = env.Clone()
+
env.CppUnitTest('atomic_proxy_test', 'atomic_proxy_test.cpp')
env.CppUnitTest('atomic_word_test', 'atomic_word_test.cpp')
env.CppUnitTest('bits_test', 'bits_test.cpp')
diff --git a/src/mongo/rpc/SConscript b/src/mongo/rpc/SConscript
index afcfe2563e6..02d11436897 100644
--- a/src/mongo/rpc/SConscript
+++ b/src/mongo/rpc/SConscript
@@ -2,6 +2,8 @@
Import("env")
+env = env.Clone()
+
env.Library(
target=[
'command_status',
diff --git a/src/mongo/s/SConscript b/src/mongo/s/SConscript
index 28c3b86871b..3185986821f 100644
--- a/src/mongo/s/SConscript
+++ b/src/mongo/s/SConscript
@@ -2,6 +2,8 @@
Import("env")
+env = env.Clone()
+
env.SConscript(
dirs=[
'catalog',
@@ -10,6 +12,9 @@ env.SConscript(
'query',
'write_ops',
],
+ exports=[
+ 'env',
+ ],
)
# Functionality for initializing global sharding state
diff --git a/src/mongo/s/catalog/SConscript b/src/mongo/s/catalog/SConscript
index f9e5e7746c0..48f6935ad16 100644
--- a/src/mongo/s/catalog/SConscript
+++ b/src/mongo/s/catalog/SConscript
@@ -2,6 +2,8 @@
Import("env")
+env = env.Clone()
+
env.Library(
target='sharding_catalog_client',
source=[
diff --git a/src/mongo/s/client/SConscript b/src/mongo/s/client/SConscript
index 6719c2cb248..cf9882db055 100644
--- a/src/mongo/s/client/SConscript
+++ b/src/mongo/s/client/SConscript
@@ -2,6 +2,8 @@
Import("env")
+env = env.Clone()
+
env.Library(
target='sharding_client',
source=[
diff --git a/src/mongo/s/commands/SConscript b/src/mongo/s/commands/SConscript
index cca960b9e92..76fed1bd62c 100644
--- a/src/mongo/s/commands/SConscript
+++ b/src/mongo/s/commands/SConscript
@@ -2,6 +2,8 @@
Import("env")
+env = env.Clone()
+
# These commands are linked both in MongoS and MongoD
env.Library(
target='shared_cluster_commands',
diff --git a/src/mongo/s/query/SConscript b/src/mongo/s/query/SConscript
index 9bdf9c189db..b560529ae3c 100644
--- a/src/mongo/s/query/SConscript
+++ b/src/mongo/s/query/SConscript
@@ -2,6 +2,8 @@
Import("env")
+env = env.Clone()
+
env.Library(
target="cluster_query",
source=[
diff --git a/src/mongo/s/write_ops/SConscript b/src/mongo/s/write_ops/SConscript
index 6cf575fed8c..8fb26fa7695 100644
--- a/src/mongo/s/write_ops/SConscript
+++ b/src/mongo/s/write_ops/SConscript
@@ -2,6 +2,8 @@
Import("env")
+env = env.Clone()
+
env.Library(
target='batch_write_types',
source=[
diff --git a/src/mongo/shell/SConscript b/src/mongo/shell/SConscript
index a850457221e..73dee5eea45 100644
--- a/src/mongo/shell/SConscript
+++ b/src/mongo/shell/SConscript
@@ -2,6 +2,8 @@
Import("env")
+env = env.Clone()
+
generateJSErrorCodes = env.Command(
target=['error_codes.js'],
source=['$BUILD_DIR/mongo/base/generate_error_codes.py', '$BUILD_DIR/mongo/base/error_codes.err'],
diff --git a/src/mongo/tools/SConscript b/src/mongo/tools/SConscript
index 9fc54b1f7d1..229e9c6c15f 100644
--- a/src/mongo/tools/SConscript
+++ b/src/mongo/tools/SConscript
@@ -2,6 +2,8 @@
Import('env')
+env = env.Clone()
+
mongobridge = env.Program(
target="mongobridge",
source=[
diff --git a/src/mongo/transport/SConscript b/src/mongo/transport/SConscript
index b8a12cfa695..17e805ed5c2 100644
--- a/src/mongo/transport/SConscript
+++ b/src/mongo/transport/SConscript
@@ -2,6 +2,8 @@
Import('env')
+env = env.Clone()
+
env.CppUnitTest(
target='ingress_header_test',
source=[
diff --git a/src/mongo/unittest/SConscript b/src/mongo/unittest/SConscript
index 94381f8718f..5dfd2e9f852 100644
--- a/src/mongo/unittest/SConscript
+++ b/src/mongo/unittest/SConscript
@@ -2,6 +2,8 @@
Import("env")
+env = env.Clone()
+
env.Library(target="unittest",
source=[
'bson_test_util.cpp',
diff --git a/src/mongo/util/SConscript b/src/mongo/util/SConscript
index b3a2add1a8a..c277fb4a1e8 100644
--- a/src/mongo/util/SConscript
+++ b/src/mongo/util/SConscript
@@ -5,6 +5,8 @@ Import("get_option")
Import("has_option")
Import("use_system_version_of_library")
+env = env.Clone()
+
env.SConscript(
dirs=[
'cmdline_utils',
@@ -12,6 +14,9 @@ env.SConscript(
'net',
'options_parser',
],
+ exports=[
+ 'env',
+ ],
)
env.Library(
diff --git a/src/mongo/util/cmdline_utils/SConscript b/src/mongo/util/cmdline_utils/SConscript
index 8aa54db18c6..2b84cb216c9 100644
--- a/src/mongo/util/cmdline_utils/SConscript
+++ b/src/mongo/util/cmdline_utils/SConscript
@@ -2,6 +2,8 @@
Import("env")
+env = env.Clone()
+
env.Library('cmdline_utils', ['censor_cmdline.cpp'],
LIBDEPS=['$BUILD_DIR/mongo/base'])
diff --git a/src/mongo/util/concurrency/SConscript b/src/mongo/util/concurrency/SConscript
index f8dc8f06d77..32dabcafa63 100644
--- a/src/mongo/util/concurrency/SConscript
+++ b/src/mongo/util/concurrency/SConscript
@@ -2,6 +2,8 @@
Import("env")
+env = env.Clone()
+
env.Library(
target='thread_pool',
source=[
diff --git a/src/mongo/util/net/SConscript b/src/mongo/util/net/SConscript
index b53be63d404..f0bee989df5 100644
--- a/src/mongo/util/net/SConscript
+++ b/src/mongo/util/net/SConscript
@@ -2,6 +2,8 @@
Import('env')
+env = env.Clone()
+
env.Library(
target='hostandport',
source=[
diff --git a/src/mongo/util/options_parser/SConscript b/src/mongo/util/options_parser/SConscript
index 099098408c0..84e97748f1c 100644
--- a/src/mongo/util/options_parser/SConscript
+++ b/src/mongo/util/options_parser/SConscript
@@ -2,6 +2,8 @@
Import("env")
+env = env.Clone()
+
optsEnv = env.Clone()
optsEnv.InjectThirdPartyIncludePaths(libraries=['yaml'])
diff --git a/src/third_party/IntelRDFPMathLib20U1/SConscript b/src/third_party/IntelRDFPMathLib20U1/SConscript
index 56d3649dbfe..3245e17d0d4 100644
--- a/src/third_party/IntelRDFPMathLib20U1/SConscript
+++ b/src/third_party/IntelRDFPMathLib20U1/SConscript
@@ -4,6 +4,7 @@ Import("env")
Import("has_option")
Import("debugBuild")
+env = env.Clone()
files = [
"LIBRARY/float128/dpml_exception.c",
diff --git a/src/third_party/SConscript b/src/third_party/SConscript
index 3a820399677..bc9a2c08927 100644
--- a/src/third_party/SConscript
+++ b/src/third_party/SConscript
@@ -96,6 +96,7 @@ def injectThirdPartyIncludePaths(thisEnv, libraries):
env.AddMethod(injectAllThirdPartyIncludePaths, 'InjectAllThirdPartyIncludePaths')
env.AddMethod(injectThirdPartyIncludePaths, 'InjectThirdPartyIncludePaths')
+env = env.Clone()
murmurEnv = env.Clone()
murmurEnv.SConscript('murmurhash3/SConscript', exports={ 'env' : murmurEnv })
@@ -196,7 +197,6 @@ if use_system_version_of_library("zlib"):
else:
zlibEnv = env.Clone()
zlibEnv.InjectThirdPartyIncludePaths(libraries=['zlib'])
- zlibEnv.InjectMongoIncludePaths()
zlibEnv.SConscript('zlib' + zlibSuffix + '/SConscript', exports={ 'env' : zlibEnv })
zlibEnv = zlibEnv.Clone(
LIBDEPS=[
@@ -234,7 +234,6 @@ if (gperftoolsEnv['MONGO_ALLOCATOR'] == "tcmalloc"):
else:
gperftoolsEnv = env.Clone()
gperftoolsEnv.InjectThirdPartyIncludePaths(libraries=['gperftools'])
- gperftoolsEnv.InjectMongoIncludePaths()
gperftoolsEnv.SConscript('gperftools' + gperftoolsSuffix + '/SConscript', exports={ 'env' : gperftoolsEnv })
gperftoolsEnv = gperftoolsEnv.Clone(
LIBDEPS=[
diff --git a/src/third_party/asio-asio-1-11-0/SConscript b/src/third_party/asio-asio-1-11-0/SConscript
index 242bb7db889..59dbda73eb4 100644
--- a/src/third_party/asio-asio-1-11-0/SConscript
+++ b/src/third_party/asio-asio-1-11-0/SConscript
@@ -1,6 +1,8 @@
Import("env")
Import("has_option")
+env = env.Clone()
+
asio_src = [
"asio/src/asio.cpp",
]
diff --git a/src/third_party/boost-1.60.0/SConscript b/src/third_party/boost-1.60.0/SConscript
index 9a850106b2c..bea790be5ad 100644
--- a/src/third_party/boost-1.60.0/SConscript
+++ b/src/third_party/boost-1.60.0/SConscript
@@ -2,6 +2,8 @@
Import("env")
+env = env.Clone()
+
env.Library('boost_system', ['libs/system/src/error_code.cpp'])
boost_thread_source = dict(
diff --git a/src/third_party/gperftools-2.5/SConscript b/src/third_party/gperftools-2.5/SConscript
index e2696c7d545..b9e7ca1d418 100644
--- a/src/third_party/gperftools-2.5/SConscript
+++ b/src/third_party/gperftools-2.5/SConscript
@@ -4,6 +4,8 @@ Import("env")
Import("has_option")
Import("debugBuild")
+env = env.Clone()
+
files = [
'src/base/dynamic_annotations.c',
'src/base/elf_mem_image.cc',
diff --git a/src/third_party/libstemmer_c/SConscript b/src/third_party/libstemmer_c/SConscript
index 3b8997f48bc..72b6edf2f9a 100644
--- a/src/third_party/libstemmer_c/SConscript
+++ b/src/third_party/libstemmer_c/SConscript
@@ -2,6 +2,8 @@
Import("env")
+env = env.Clone()
+
# We only use the utf8 stemmers.
stemming_packages = [
#"ISO_8859_1_danish",
diff --git a/src/third_party/mozjs-45/SConscript b/src/third_party/mozjs-45/SConscript
index 4d1efd7a58b..b38dfe804fe 100644
--- a/src/third_party/mozjs-45/SConscript
+++ b/src/third_party/mozjs-45/SConscript
@@ -79,8 +79,6 @@ else:
# We pre-generate configs for platforms and just check them in. Running
# mozilla's config requires a relatively huge portion of their tree.
env.Prepend(CPPPATH=[
- '#src',
- '$BUILD_DIR',
'extract/js/src',
'extract/mfbt',
'extract/intl/icu/source/common',
diff --git a/src/third_party/murmurhash3/SConscript b/src/third_party/murmurhash3/SConscript
index 058701e9da8..5c6a8b844f1 100644
--- a/src/third_party/murmurhash3/SConscript
+++ b/src/third_party/murmurhash3/SConscript
@@ -1,5 +1,7 @@
Import("env")
+env = env.Clone()
+
env.InjectThirdPartyIncludePaths(libraries=['boost'])
env.Append(CPPPATH=['#src', '$BUILD_DIR'])
diff --git a/src/third_party/pcre-8.39/SConscript b/src/third_party/pcre-8.39/SConscript
index e7b9a59a550..b14d2658b66 100644
--- a/src/third_party/pcre-8.39/SConscript
+++ b/src/third_party/pcre-8.39/SConscript
@@ -3,6 +3,7 @@
Import("env")
env = env.Clone()
+
env.Append( CPPDEFINES=[ "HAVE_CONFIG_H", ] )
def removeIfPresent(lst, item):
diff --git a/src/third_party/s2/SConscript b/src/third_party/s2/SConscript
index 830dd65cedc..04536677d07 100644
--- a/src/third_party/s2/SConscript
+++ b/src/third_party/s2/SConscript
@@ -4,12 +4,17 @@ Import("env")
env = env.Clone()
-env.SConscript( [
- "base/SConscript",
- "strings/SConscript",
- "util/coding/SConscript",
- "util/math/SConscript",
- ], exports={ 'env' : env })
+env.SConscript(
+ dirs=[
+ "base",
+ "strings",
+ "util/coding",
+ "util/math",
+ ],
+ exports=[
+ 'env',
+ ],
+)
env.Append(CCFLAGS=['-DDEBUG_MODE=false'])
diff --git a/src/third_party/tz/SConscript b/src/third_party/tz/SConscript
index b3449b6f513..889664efb2b 100644
--- a/src/third_party/tz/SConscript
+++ b/src/third_party/tz/SConscript
@@ -1,3 +1,5 @@
Import("env")
+env = env.Clone()
+
env.Library("tz", [ "timegm.c" ])
diff --git a/src/third_party/wiredtiger/SConscript b/src/third_party/wiredtiger/SConscript
index 8334ac0df5f..2d371526c55 100644
--- a/src/third_party/wiredtiger/SConscript
+++ b/src/third_party/wiredtiger/SConscript
@@ -7,6 +7,7 @@ Import("get_option")
Import("endian")
env = env.Clone()
+
env.InjectThirdPartyIncludePaths(libraries=['snappy', 'zlib'])
if endian == "big":
diff --git a/src/third_party/zlib-1.2.8/SConscript b/src/third_party/zlib-1.2.8/SConscript
index 8bdc06a2bb4..3b98cf6ef0b 100644
--- a/src/third_party/zlib-1.2.8/SConscript
+++ b/src/third_party/zlib-1.2.8/SConscript
@@ -2,6 +2,7 @@
Import("env")
env = env.Clone()
+
env.Append(CPPDEFINES=["HAVE_STDARG_H"])
if not env.TargetOSIs('windows'):
env.Append(CPPDEFINES=["HAVE_UNISTD_H"])