diff options
author | Andrew Morrow <acm@mongodb.com> | 2016-12-21 18:48:56 -0500 |
---|---|---|
committer | Andrew Morrow <acm@mongodb.com> | 2017-01-03 09:45:52 -0500 |
commit | 1346352ff66b163fb010a270d1826c18699f3b36 (patch) | |
tree | 1fbe90cabe0bbdc3c6601008effbcac09ca05c65 /src/mongo/db | |
parent | 4a5adbb971bdf95adce07ec01120c24b44268946 (diff) | |
download | mongo-1346352ff66b163fb010a270d1826c18699f3b36.tar.gz |
SERVER-27497 Scope SCons Environment changes narrowly
Diffstat (limited to 'src/mongo/db')
27 files changed, 73 insertions, 1 deletions
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=[ |