diff options
author | Tausif Rahman <tausif.rahman@mongodb.com> | 2022-05-24 22:55:22 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-05-25 17:40:16 +0000 |
commit | 9ea1d6f0419938770eea612479c75838f75752b7 (patch) | |
tree | 26b57fa102878dba3251b40f7ddf9c50ab8b275a /src | |
parent | 3ad805fea14b2f1d5c5a367f6ec05ece93502f32 (diff) | |
download | mongo-9ea1d6f0419938770eea612479c75838f75752b7.tar.gz |
SERVER-66490 Apply pylinters to build system code
Diffstat (limited to 'src')
99 files changed, 1184 insertions, 1317 deletions
diff --git a/src/SConscript b/src/SConscript index 25f9eb93146..f51cfbd7d19 100644 --- a/src/SConscript +++ b/src/SConscript @@ -13,11 +13,9 @@ env = env.Clone() # Add any "global" dependencies here. This is where we make every build node # depend on a list of other build nodes, such as an allocator or libunwind # or libstdx or similar. -env.AppendUnique( - LIBDEPS_GLOBAL=[ - '$BUILD_DIR/third_party/shim_allocator', - ], -) +env.AppendUnique(LIBDEPS_GLOBAL=[ + '$BUILD_DIR/third_party/shim_allocator', +], ) # NOTE: We must do third_party first as it adds methods to the environment # that we need in the mongo sconscript @@ -41,7 +39,6 @@ env.InjectThirdParty(libraries=[ 'variant', ]) - # It would be somewhat better if this could be applied down in # `src/mongo/SConscript`, since the goal of doing it here rather than # up in SConstruct is to only enforce this rule for code that we wrote diff --git a/src/mongo/SConscript b/src/mongo/SConscript index db6a4182ed7..6cb7d85b326 100644 --- a/src/mongo/SConscript +++ b/src/mongo/SConscript @@ -15,11 +15,9 @@ env = env.Clone() env.InjectMongoIncludePaths() -env.AppendUnique( - FORCEINCLUDES=[ - 'mongo/platform/basic.h', - ], -) +env.AppendUnique(FORCEINCLUDES=[ + 'mongo/platform/basic.h', +], ) env.SConscript( dirs=[ @@ -53,7 +51,8 @@ env.SConscript( ) config_header_substs = ( - ('@mongo_config_altivec_vec_vbpermq_output_index@', 'MONGO_CONFIG_ALTIVEC_VEC_VBPERMQ_OUTPUT_INDEX'), + ('@mongo_config_altivec_vec_vbpermq_output_index@', + 'MONGO_CONFIG_ALTIVEC_VEC_VBPERMQ_OUTPUT_INDEX'), ('@mongo_config_debug_build@', 'MONGO_CONFIG_DEBUG_BUILD'), ('@mongo_config_have_execinfo_backtrace@', 'MONGO_CONFIG_HAVE_EXECINFO_BACKTRACE'), ('@mongo_config_have_explicit_bzero@', 'MONGO_CONFIG_HAVE_EXPLICIT_BZERO'), @@ -78,20 +77,21 @@ config_header_substs = ( ('@mongo_config_wiredtiger_enabled@', 'MONGO_CONFIG_WIREDTIGER_ENABLED'), ) + def makeConfigHeaderDefine(self, key): val = "// #undef {0}".format(key) if key in self['CONFIG_HEADER_DEFINES']: val = "#define {0} {1}".format(key, self['CONFIG_HEADER_DEFINES'][key]) return val + + env.AddMethod(makeConfigHeaderDefine) generateConfigHeaderFile = env.Substfile( 'config.h.in', - SUBST_DICT=[(k, env.makeConfigHeaderDefine(v)) for (k, v) in config_header_substs] -) + SUBST_DICT=[(k, env.makeConfigHeaderDefine(v)) for (k, v) in config_header_substs]) env.Alias('generated-sources', generateConfigHeaderFile) - # NOTE: The 'base' library does not really belong here. Its presence # here is temporary. Do not add to this library, do not remove from # it, and do not declare other libraries in this file. @@ -102,11 +102,9 @@ if use_libunwind == True: quick_exit_env = baseEnv.Clone() if has_option('gcov'): - quick_exit_env.Append( - CPPDEFINES=[ - 'MONGO_GCOV', - ], - ) + quick_exit_env.Append(CPPDEFINES=[ + 'MONGO_GCOV', + ], ) quick_exit_obj = quick_exit_env.LibraryObject( target='quick_exit', source=[ @@ -261,9 +259,11 @@ env.AutoInstall( # If no module has introduced a file named LICENSE-Enterprise.txt then this # is a Community build, so inject the AGPL and the Community license -enterprise_license = [banner for banner in env["MODULE_BANNERS"] if banner.name == "LICENSE-Enterprise.txt"] +enterprise_license = [ + banner for banner in env["MODULE_BANNERS"] if banner.name == "LICENSE-Enterprise.txt" +] if not enterprise_license: - env.Append(MODULE_BANNERS = [distsrc.File('LICENSE-Community.txt')]) + env.Append(MODULE_BANNERS=[distsrc.File('LICENSE-Community.txt')]) # All module banners get staged to the top level of the tarfile, so we # need to fail if we are going to have a name collision. diff --git a/src/mongo/base/SConscript b/src/mongo/base/SConscript index 685e32ce7e1..f71721623ba 100644 --- a/src/mongo/base/SConscript +++ b/src/mongo/base/SConscript @@ -4,7 +4,6 @@ Import("env") env = env.Clone() - # This needs to use its own env to tell scons to suppress scanning the .tpl.h and .tpl.cpp inputs # for #includes since they aren't directly preprocessed. Scons will still scan the generated files # to produce the correct implicit dependencies when they are compiled. @@ -13,7 +12,7 @@ env_for_error_codes['SCANNERS'] = [] generateErrorCodes = env_for_error_codes.Command( target=[ 'error_codes.h', - 'error_codes.cpp' + 'error_codes.cpp', ], source=[ 'generate_error_codes.py', @@ -31,7 +30,7 @@ env.Alias('generated-sources', generateErrorCodes) env.Library( target=[ - 'system_error' + 'system_error', ], source=[ 'system_error.cpp', @@ -57,7 +56,7 @@ env.Library( env.Library( target=[ - 'secure_allocator' + 'secure_allocator', ], source=[ 'secure_allocator.cpp', @@ -111,4 +110,3 @@ env.Benchmark( '$BUILD_DIR/mongo/util/processinfo', ], ) - diff --git a/src/mongo/bson/SConscript b/src/mongo/bson/SConscript index d4156225e85..2f5c806d6f6 100644 --- a/src/mongo/bson/SConscript +++ b/src/mongo/bson/SConscript @@ -58,7 +58,7 @@ asioEnv.InjectThirdParty('asio') asioEnv.CppIntegrationTest( target='bson_integration_test', source=[ - 'ugly_bson_integration_test.cpp' + 'ugly_bson_integration_test.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/executor/network_interface', diff --git a/src/mongo/bson/util/SConscript b/src/mongo/bson/util/SConscript index e759ec9873f..57ea076ecfe 100644 --- a/src/mongo/bson/util/SConscript +++ b/src/mongo/bson/util/SConscript @@ -34,7 +34,7 @@ env.Benchmark( ], LIBDEPS=[ '$BUILD_DIR/mongo/base', - 'bson_column' + 'bson_column', ], ) @@ -45,12 +45,12 @@ env.CppUnitTest( 'bson_extract_test.cpp', 'bsoncolumn_test.cpp', 'builder_test.cpp', - 'simple8b_test.cpp', + 'simple8b_test.cpp', 'simple8b_type_util_test.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/base', - 'bson_column', + 'bson_column', 'bson_extract', ], ) @@ -62,6 +62,6 @@ env.Benchmark( ], LIBDEPS=[ '$BUILD_DIR/mongo/base', - 'bson_column' + 'bson_column', ], ) diff --git a/src/mongo/client/SConscript b/src/mongo/client/SConscript index 5010be181f0..1e613f942a0 100644 --- a/src/mongo/client/SConscript +++ b/src/mongo/client/SConscript @@ -8,7 +8,7 @@ env = env.Clone() env.SConscript( dirs=['sdam'], - exports=['env'] + exports=['env'], ) # Contains only the core ConnectionString functionality, *not* the ability to call connect() and @@ -38,11 +38,10 @@ env.Library( ], LIBDEPS=[ '$BUILD_DIR/mongo/bson/util/bson_extract', - '$BUILD_DIR/mongo/db/service_context' + '$BUILD_DIR/mongo/db/service_context', ], ) - if get_option('ssl') == 'on': env.Library( target=[ @@ -53,7 +52,7 @@ if get_option('ssl') == 'on': ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/base', - '$BUILD_DIR/mongo/db/server_options_core', # For object_check.h + '$BUILD_DIR/mongo/db/server_options_core', # For object_check.h '$BUILD_DIR/mongo/idl/idl_parser', ], ) @@ -72,7 +71,7 @@ if get_option('ssl') == 'on': ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/base', - '$BUILD_DIR/mongo/db/server_options_core', # For object_check.h + '$BUILD_DIR/mongo/db/server_options_core', # For object_check.h '$BUILD_DIR/mongo/idl/idl_parser', '$BUILD_DIR/third_party/shim_kms_message', 'sasl_aws_common', @@ -143,7 +142,7 @@ env.Library( '$BUILD_DIR/mongo/bson/util/bson_extract', '$BUILD_DIR/mongo/executor/remote_command', 'internal_auth', - 'sasl_client' + 'sasl_client', ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/auth/auth', @@ -247,7 +246,7 @@ clientDriverEnv.Library( '$BUILD_DIR/mongo/db/commands/test_commands_enabled', '$BUILD_DIR/mongo/transport/message_compressor', '$BUILD_DIR/mongo/util/net/ssl_manager', - ] + ], ) env.Library( @@ -258,7 +257,7 @@ env.Library( ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/idl/server_parameter', - ] + ], ) env.Library( @@ -370,7 +369,7 @@ if wiredtiger: 'server_discovery_monitor_test.cpp', 'server_ping_monitor_test.cpp', 'streamable_replica_set_monitor_error_handler_test.cpp', - 'streamable_replica_set_monitor_discovery_time_processor_test.cpp' + 'streamable_replica_set_monitor_discovery_time_processor_test.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/client/sdam/sdam', @@ -467,10 +466,6 @@ env.CppIntegrationTest( env.Library( target='dbclient_mockcursor', - source=[ - 'dbclient_mockcursor.cpp' - ], - LIBDEPS_PRIVATE=[ - 'clientdriver_minimal' - ], + source=['dbclient_mockcursor.cpp'], + LIBDEPS_PRIVATE=['clientdriver_minimal'], ) diff --git a/src/mongo/client/sdam/SConscript b/src/mongo/client/sdam/SConscript index 0b065b6b52a..4563eba4f2a 100644 --- a/src/mongo/client/sdam/SConscript +++ b/src/mongo/client/sdam/SConscript @@ -12,20 +12,20 @@ env.Library( LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/server_options_core', '$BUILD_DIR/mongo/idl/server_parameter', - ] + ], ) env.Library( target='sdam', source=[ - 'sdam_configuration.cpp', + 'sdam_configuration.cpp', 'sdam_datatypes.cpp', 'server_description.cpp', 'topology_description.cpp', - 'topology_listener.cpp', + 'topology_listener.cpp', 'topology_state_machine.cpp', 'topology_manager.cpp', - 'server_selector.cpp', + 'server_selector.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/base', @@ -39,11 +39,11 @@ env.Library( ], ) - sdam_json_test = env.Program( target='sdam_json_test', source=[ - 'sdam_json_test_runner.cpp'], + 'sdam_json_test_runner.cpp', + ], AIB_COMPONENT="sdam-json-test", LIBDEPS=[ '$BUILD_DIR/mongo/client/connection_string', @@ -53,13 +53,13 @@ sdam_json_test = env.Program( 'sdam_configuration_parameters', 'sdam_test', ], - )[0] server_selection_json_test = env.Program( target='server_selection_json_test', source=[ - 'server_selection_json_test_runner.cpp'], + 'server_selection_json_test_runner.cpp', + ], AIB_COMPONENT="server-selection-json-test", LIBDEPS=[ '$BUILD_DIR/mongo/client/connection_string', @@ -129,12 +129,12 @@ env.CppUnitTest( ) env.CppUnitTest( - target='server_selector_test', - source=['server_selector_test.cpp'], - LIBDEPS=[ - 'sdam', - 'sdam_test', - ], + target='server_selector_test', + source=['server_selector_test.cpp'], + LIBDEPS=[ + 'sdam', + 'sdam_test', + ], ) env.CppUnitTest( diff --git a/src/mongo/crypto/SConscript b/src/mongo/crypto/SConscript index d6e291f712f..b6a3453a16d 100644 --- a/src/mongo/crypto/SConscript +++ b/src/mongo/crypto/SConscript @@ -8,39 +8,35 @@ Import([ env = env.Clone() -env.Library('sha1_block', - source=[ - 'sha1_block.cpp' - ], +env.Library( + 'sha1_block', + source=['sha1_block.cpp'], LIBDEPS=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/util/secure_compare_memory', - ]) - -env.Library('sha256_block', - source=[ - 'sha256_block.cpp' ], +) + +env.Library( + 'sha256_block', + source=['sha256_block.cpp'], LIBDEPS=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/util/secure_compare_memory', - ]) + ], +) cryptoEnv = env.Clone() if "tom" in env["MONGO_CRYPTO"]: cryptoEnv.InjectThirdParty(libraries=['tomcrypt']) - cryptoEnv.Append( - CPPDEFINES=[ - 'LTC_NO_PROTOTYPES', - ] - ) + cryptoEnv.Append(CPPDEFINES=[ + 'LTC_NO_PROTOTYPES', + ]) cryptoEnv.Library( target='sha_block_${MONGO_CRYPTO}', - source=[ - 'sha_block_${MONGO_CRYPTO}.cpp' - ], + source=['sha_block_${MONGO_CRYPTO}.cpp'], LIBDEPS=[ '$BUILD_DIR/mongo/base', 'sha1_block', @@ -48,10 +44,11 @@ cryptoEnv.Library( ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/third_party/shim_tomcrypt' if "tom" in env["MONGO_CRYPTO"] else [], - ] + ], ) -cryptoEnv.Library(target='symmetric_crypto', +cryptoEnv.Library( + target='symmetric_crypto', source=[ 'symmetric_crypto.cpp', 'symmetric_crypto_${MONGO_CRYPTO}.cpp', @@ -63,7 +60,7 @@ cryptoEnv.Library(target='symmetric_crypto', ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/third_party/shim_tomcrypt' if "tom" in env["MONGO_CRYPTO"] else [], - ] + ], ) env.Library( @@ -84,9 +81,9 @@ env.Library( "encryption_fields.idl", ], LIBDEPS=[ - '$BUILD_DIR/mongo/idl/feature_flag', - '$BUILD_DIR/mongo/idl/idl_parser', - ] + '$BUILD_DIR/mongo/idl/feature_flag', + '$BUILD_DIR/mongo/idl/idl_parser', + ], ) env.Library( @@ -120,7 +117,7 @@ env.Library( ], LIBDEPS=[ '$BUILD_DIR/mongo/idl/idl_parser', - ] + ], ) env.CppUnitTest( diff --git a/src/mongo/db/SConscript b/src/mongo/db/SConscript index 1cdea6aa03b..1943337fcdc 100644 --- a/src/mongo/db/SConscript +++ b/src/mongo/db/SConscript @@ -77,7 +77,7 @@ env.Library( ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/catalog/collection_uuid_mismatch_info', - ] + ], ) env.Library( @@ -94,7 +94,7 @@ env.Library( '$BUILD_DIR/mongo/db/auth/security_token', '$BUILD_DIR/mongo/idl/feature_flag', 'server_feature_flags', - ] + ], ) env.Library( @@ -117,7 +117,6 @@ env.Library( ], ) - env.Library( target="dbmessage", source=[ @@ -127,7 +126,7 @@ env.Library( '$BUILD_DIR/mongo/db/server_options_core', '$BUILD_DIR/mongo/transport/transport_layer_common', '$BUILD_DIR/mongo/util/net/network', - ] + ], ) env.Library( @@ -139,7 +138,7 @@ env.Library( '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/client/authentication', '$BUILD_DIR/mongo/util/net/ssl_manager', - ] + ], ) env.Library( @@ -152,7 +151,7 @@ env.Library( '$BUILD_DIR/mongo/db/repl/repl_settings', '$BUILD_DIR/mongo/util/processinfo', 'startup_warnings_common', - ] + ], ) env.Library( @@ -169,7 +168,6 @@ env.Library( target='curop', source=[ 'curop.cpp', - ], LIBDEPS=[ '$BUILD_DIR/mongo/bson/mutable/mutable_bson', @@ -180,8 +178,8 @@ env.Library( '$BUILD_DIR/mongo/db/stats/timer_stats', '$BUILD_DIR/mongo/rpc/client_metadata', '$BUILD_DIR/mongo/transport/service_executor', - '$BUILD_DIR/mongo/util/diagnostic_info' if get_option( - 'use-diagnostic-latches') == 'on' else [], + '$BUILD_DIR/mongo/util/diagnostic_info' + if get_option('use-diagnostic-latches') == 'on' else [], '$BUILD_DIR/mongo/util/fail_point', '$BUILD_DIR/mongo/util/net/network', '$BUILD_DIR/mongo/util/progress_meter', @@ -216,7 +214,7 @@ env.Library( LIBDEPS=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/db/commands/test_commands_enabled', - ] + ], ) env.Library( @@ -227,7 +225,7 @@ env.Library( LIBDEPS=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/util/md5', - ] + ], ) # Range arithmetic library, used by both mongod and mongos @@ -270,7 +268,7 @@ env.Library( env.Library( target='update_index_data', source=[ - 'update_index_data.cpp' + 'update_index_data.cpp', ], LIBDEPS=[ 'common', @@ -289,7 +287,7 @@ env.Library( ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/index_names', - ] + ], ) env.Library( @@ -445,7 +443,7 @@ env.Library( 'global_settings', 'server_options_base', 'server_options_servers', - ] + ], ) env.Library( @@ -475,8 +473,8 @@ env.Library( 'read_write_concern_provenance', ], LIBDEPS_PRIVATE=[ - '$BUILD_DIR/mongo/db/server_options_core', # For serverGlobalParams - ] + '$BUILD_DIR/mongo/db/server_options_core', # For serverGlobalParams + ], ) env.Library( @@ -524,14 +522,14 @@ env.Library( env.Library( target='change_stream_change_collection_manager', source=[ - 'change_stream_change_collection_manager.cpp' + 'change_stream_change_collection_manager.cpp', ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/catalog/catalog_helpers', "$BUILD_DIR/mongo/db/catalog/clustered_collection_options", '$BUILD_DIR/mongo/db/dbhelpers', '$BUILD_DIR/mongo/db/service_context', - ] + ], ) env.Library( @@ -776,7 +774,7 @@ env.Library( '$BUILD_DIR/mongo/idl/feature_flag', '$BUILD_DIR/mongo/idl/server_parameter', 'server_options_core', - ] + ], ) env.Library( @@ -786,7 +784,7 @@ env.Library( ], LIBDEPS=[ '$BUILD_DIR/mongo/idl/feature_flag', - ] + ], ) env.Library( @@ -802,7 +800,7 @@ env.Library( LIBDEPS_PRIVATE=[ 'internal_transactions_feature_flag', 'service_context', - ] + ], ) env.Library( @@ -822,7 +820,7 @@ env.Library( '$BUILD_DIR/mongo/db/catalog/local_oplog_info', '$BUILD_DIR/mongo/db/s/sharding_api_d', 'multitenancy', - ] + ], ) env.Library( @@ -871,7 +869,7 @@ env.Library( 'stats/top', 'stats/transaction_stats', 'update/update_driver', - ] + ], ) env.Library( @@ -902,7 +900,7 @@ env.Library( target='fle_crud', source=[ 'fle_crud.cpp', - 'query/fle/server_rewrite.cpp' + 'query/fle/server_rewrite.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/crypto/encrypted_field_config', @@ -1325,7 +1323,7 @@ env.Library( LIBDEPS_PRIVATE=[ "commands/server_status_core", "curop", - ] + ], ) env.Library( @@ -1445,7 +1443,7 @@ env.Library( 'commands/server_status_core', 'service_context', 'write_ops', - ] + ], ) env.Library( @@ -1460,7 +1458,8 @@ env.Library( '$BUILD_DIR/mongo/db/catalog/clustered_collection_options', '$BUILD_DIR/mongo/db/query/collation/collator_interface', '$BUILD_DIR/mongo/db/storage/key_string', - ],) + ], +) env.Library( target='query_exec', @@ -1839,7 +1838,7 @@ env.Library( LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/s/sharding_api_d', 'internal_transactions_feature_flag', - ] + ], ) env.Library( @@ -1946,7 +1945,7 @@ env.Library( ], LIBDEPS_PRIVATE=[ 'session_catalog', - 'transaction' + 'transaction', ], ) @@ -2027,7 +2026,7 @@ env.Library( ], LIBDEPS=[ 'logical_time', - 'time_proof_service' + 'time_proof_service', ], ) @@ -2104,7 +2103,7 @@ env.Library( target='vector_clock_mongod', source=[ 's/topology_time_ticker.cpp', - 'vector_clock_mongod.cpp' + 'vector_clock_mongod.cpp', ], LIBDEPS=[ 'vector_clock_mutable', @@ -2353,7 +2352,7 @@ env.Library( env.Program( target="mongotrafficreader", source=[ - "traffic_reader_main.cpp" + "traffic_reader_main.cpp", ], LIBDEPS=[ '$BUILD_DIR/mongo/base', @@ -2372,11 +2371,10 @@ env.Library( '$BUILD_DIR/mongo/base', ], LIBDEPS_PRIVATE=[ - '$BUILD_DIR/mongo/util/net/ssl_options_server' if get_option( - 'ssl') == 'on' else '', + '$BUILD_DIR/mongo/util/net/ssl_options_server' if get_option('ssl') == 'on' else '', '$BUILD_DIR/mongo/util/options_parser/options_parser', 'mongod_options', - ] + ], ) env.Library( @@ -2399,8 +2397,8 @@ env.Library( '$BUILD_DIR/mongo/util/clock_sources', '$BUILD_DIR/mongo/util/elapsed_tracker', '$BUILD_DIR/mongo/util/fail_point', - '$BUILD_DIR/mongo/util/latch_analyzer' if get_option( - 'use-diagnostic-latches') == 'on' else [], + '$BUILD_DIR/mongo/util/latch_analyzer' + if get_option('use-diagnostic-latches') == 'on' else [], '$BUILD_DIR/mongo/util/net/network', '$BUILD_DIR/mongo/util/ntservice', '$BUILD_DIR/mongo/util/options_parser/options_parser_init', @@ -2526,8 +2524,8 @@ env.Library( '$BUILD_DIR/mongo/transport/transport_layer_manager', '$BUILD_DIR/mongo/util/cmdline_utils/cmdline_utils', '$BUILD_DIR/mongo/util/concurrency/thread_pool', - '$BUILD_DIR/mongo/util/latch_analyzer' if get_option( - 'use-diagnostic-latches') == 'on' else [], + '$BUILD_DIR/mongo/util/latch_analyzer' + if get_option('use-diagnostic-latches') == 'on' else [], '$BUILD_DIR/mongo/util/net/http_client_impl', '$BUILD_DIR/mongo/util/net/ssl_manager', '$BUILD_DIR/mongo/util/signal_handlers', @@ -2605,16 +2603,15 @@ if env.TargetOSIs('windows'): ('@mongo_version_patch@', version_parts[2]), ('@mongo_version_extra@', version_parts[3]), ('@mongo_version_extra_str@', version_extra), - ]) + ], + ) env.Alias('generated-sources', generatedDbManifest) env.Depends("mongod.res", generatedDbManifest) env.Program( target="mongod", - source=[ - 'mongod.cpp' - ] + env.WindowsResourceFile("mongod.rc"), + source=['mongod.cpp'] + env.WindowsResourceFile("mongod.rc"), LIBDEPS=[ # NOTE: Do not add new libdeps (public or private) here unless # required by the linker to satisfy symbol dependencies from diff --git a/src/mongo/db/auth/SConscript b/src/mongo/db/auth/SConscript index a2bcc5b3295..3df9d6922f2 100644 --- a/src/mongo/db/auth/SConscript +++ b/src/mongo/db/auth/SConscript @@ -87,7 +87,7 @@ env.Library( '$BUILD_DIR/mongo/db/op_observer_util', '$BUILD_DIR/mongo/db/repl/oplog_entry', 'auth', - ] + ], ) env.Library( @@ -120,7 +120,7 @@ env.Library( '$BUILD_DIR/mongo/db/db_raii', '$BUILD_DIR/mongo/db/multitenancy', 'auth_types', - ] + ], ) env.Library( @@ -208,7 +208,7 @@ env.Library( ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/api_parameters', - '$BUILD_DIR/mongo/db/audit', # audit:logLogout in AuthZSession. + '$BUILD_DIR/mongo/db/audit', # audit:logLogout in AuthZSession. '$BUILD_DIR/mongo/db/stats/counters', '$BUILD_DIR/mongo/idl/server_parameter', '$BUILD_DIR/mongo/util/caching', @@ -304,7 +304,7 @@ env.Library( "$BUILD_DIR/mongo/util/net/ssl_manager", "$BUILD_DIR/mongo/util/net/ssl_parameters_auth", 'cluster_auth_mode', - 'security_key' + 'security_key', ], LIBDEPS=[ '$BUILD_DIR/mongo/db/server_options_core', @@ -407,7 +407,7 @@ env.Library( 'sasl_options.idl', ], LIBDEPS=[ - 'sasl_options' + 'sasl_options', ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/util/net/network', @@ -466,7 +466,7 @@ env.Library( 'authz_session_external_state_s.cpp', 'user_cache_invalidator_job.cpp', 'user_cache_invalidator_job_parameters.idl', - ], + ], LIBDEPS=[ '$BUILD_DIR/mongo/base', ], @@ -513,7 +513,7 @@ env.Library( source=[ 'ldap_operation_stats.cpp', 'ldap_cumulative_operation_stats.cpp', - 'user_cache_acquisition_stats.cpp' + 'user_cache_acquisition_stats.cpp', ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/base', diff --git a/src/mongo/db/catalog/SConscript b/src/mongo/db/catalog/SConscript index 3fbdbcd6dcb..debf1c0f2cf 100644 --- a/src/mongo/db/catalog/SConscript +++ b/src/mongo/db/catalog/SConscript @@ -25,7 +25,7 @@ env.Library( '$BUILD_DIR/mongo/db/namespace_string', '$BUILD_DIR/mongo/idl/basic_types', '$BUILD_DIR/mongo/idl/idl_parser', - '$BUILD_DIR/mongo/idl/server_parameter' + '$BUILD_DIR/mongo/idl/server_parameter', ], ) @@ -126,7 +126,7 @@ env.Library( '$BUILD_DIR/mongo/db/index/index_access_method', '$BUILD_DIR/mongo/db/storage/key_string', 'validate_state', - ] + ], ) env.Library( @@ -144,7 +144,7 @@ env.Library( '$BUILD_DIR/mongo/db/storage/storage_repair_observer', 'index_repair', 'multi_index_block', - ] + ], ) env.Library( @@ -218,7 +218,7 @@ env.Library( 'collection', 'collection_catalog', 'collection_query_info', - ] + ], ) env.Library( @@ -271,7 +271,7 @@ env.Library( 'collection_query_info', 'index_build_block', 'index_catalog', - ] + ], ) env.Library( @@ -294,7 +294,7 @@ env.Library( '$BUILD_DIR/mongo/db/views/views', '$BUILD_DIR/mongo/idl/server_parameter', 'collection', - ] + ], ) env.Benchmark( @@ -327,9 +327,7 @@ env.Library( env.Library( target="validate_state", - source=[ - "validate_state.cpp" - ], + source=["validate_state.cpp"], LIBDEPS_PRIVATE=[ "$BUILD_DIR/mongo/base", "$BUILD_DIR/mongo/db/catalog_raii", @@ -341,7 +339,7 @@ env.Library( "database_holder", "index_catalog", "throttle_cursor", - ] + ], ) env.Library( @@ -418,7 +416,7 @@ env.Library( '$BUILD_DIR/mongo/db/multitenancy', '$BUILD_DIR/mongo/db/views/views', 'database_holder', - ] + ], ) env.Library( @@ -448,7 +446,7 @@ env.Library( 'index_key_validate', 'throttle_cursor', 'validate_state', - ] + ], ) env.Library( diff --git a/src/mongo/db/catalog/util/SConscript b/src/mongo/db/catalog/util/SConscript index e6f8b00c3c9..7431dcb165e 100644 --- a/src/mongo/db/catalog/util/SConscript +++ b/src/mongo/db/catalog/util/SConscript @@ -6,9 +6,6 @@ env = env.Clone() env.CppUnitTest( target='db_catalog_util_test', - source=[ - 'partitioned_test.cpp' - ], - LIBDEPS=[ - ] + source=['partitioned_test.cpp'], + LIBDEPS=[], ) diff --git a/src/mongo/db/commands/SConscript b/src/mongo/db/commands/SConscript index b1aaa872559..adddad9dfd7 100644 --- a/src/mongo/db/commands/SConscript +++ b/src/mongo/db/commands/SConscript @@ -15,7 +15,7 @@ env.Library( LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/idl/server_parameter', "server_status_core", - ] + ], ) env.Library( @@ -27,7 +27,7 @@ env.Library( ], LIBDEPS=[ '$BUILD_DIR/mongo/base', - ] + ], ) env.Library( @@ -190,7 +190,7 @@ env.Library( 'feature_compatibility_parsers', 'server_status', 'test_commands_enabled', - ] + ], ) env.Library( @@ -200,7 +200,7 @@ env.Library( ], LIBDEPS=[ '$BUILD_DIR/mongo/db/read_write_concern_defaults', - ] + ], ) env.Library( @@ -219,7 +219,7 @@ env.Library( '$BUILD_DIR/mongo/rpc/client_metadata', '$BUILD_DIR/mongo/util/net/ssl_manager', 'test_commands_enabled', - ] + ], ) env.Library( @@ -235,7 +235,7 @@ env.Library( '$BUILD_DIR/mongo/db/curop', '$BUILD_DIR/mongo/db/storage/backup_cursor_hooks', 'fsync_locked', - ] + ], ) env.Library( @@ -262,8 +262,7 @@ env.Library( source=[ 'fsync_locked.cpp', ], - LIBDEPS=[ - ], + LIBDEPS=[], ) env.Library( @@ -618,7 +617,7 @@ env.Library( LIBDEPS=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/s/write_ops/cluster_write_ops', - 'cluster_server_parameter_cmds_idl' + 'cluster_server_parameter_cmds_idl', ], ) @@ -641,7 +640,7 @@ env.Library( env.Library( target='current_op_common', source=[ - 'current_op_common.cpp' + 'current_op_common.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/db/commands', @@ -651,7 +650,7 @@ env.Library( '$BUILD_DIR/mongo/db/pipeline/aggregation_request_helper', '$BUILD_DIR/mongo/db/query/command_request_response', '$BUILD_DIR/mongo/db/service_context', - 'test_commands_enabled' + 'test_commands_enabled', ], ) @@ -701,7 +700,7 @@ env.Library( '$BUILD_DIR/mongo/db/serverless/serverless_types_idl', '$BUILD_DIR/mongo/idl/feature_flag', '$BUILD_DIR/mongo/idl/idl_parser', - ] + ], ) env.Library( target='txn_cmd_request', @@ -713,7 +712,7 @@ env.Library( '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/db/auth/authprivilege', '$BUILD_DIR/mongo/idl/idl_parser', - ] + ], ) env.Library( @@ -725,7 +724,7 @@ env.Library( LIBDEPS=[ '$BUILD_DIR/mongo/db/write_concern_options', '$BUILD_DIR/mongo/idl/idl_parser', - ] + ], ) env.Library( @@ -734,16 +733,13 @@ env.Library( 'map_reduce_agg.cpp', ], LIBDEPS=[ - '$BUILD_DIR/mongo/db/commands/servers', - '$BUILD_DIR/mongo/db/db_raii', + '$BUILD_DIR/mongo/db/commands/servers', '$BUILD_DIR/mongo/db/db_raii', '$BUILD_DIR/mongo/db/index/index_access_methods', '$BUILD_DIR/mongo/db/pipeline/process_interface/mongo_process_interface', '$BUILD_DIR/mongo/db/pipeline/process_interface/mongod_process_interface_factory', - '$BUILD_DIR/mongo/db/query/map_reduce_output_format', - '$BUILD_DIR/mongo/db/query_exec', - '$BUILD_DIR/mongo/idl/idl_parser', - 'map_reduce_parser' - ] + '$BUILD_DIR/mongo/db/query/map_reduce_output_format', '$BUILD_DIR/mongo/db/query_exec', + '$BUILD_DIR/mongo/idl/idl_parser', 'map_reduce_parser' + ], ) env.CppUnitTest( diff --git a/src/mongo/db/concurrency/SConscript b/src/mongo/db/concurrency/SConscript index 916d353bf05..26403ec4a90 100644 --- a/src/mongo/db/concurrency/SConscript +++ b/src/mongo/db/concurrency/SConscript @@ -92,7 +92,8 @@ env.Benchmark( ], LIBDEPS=[ 'lock_manager', - ]) + ], +) env.CppUnitTest( target='db_concurrency_test', @@ -112,5 +113,5 @@ env.CppUnitTest( '$BUILD_DIR/mongo/util/progress_meter', 'exception_util', 'lock_manager', - ] + ], ) diff --git a/src/mongo/db/cst/SConscript b/src/mongo/db/cst/SConscript index 16f5a25932f..09c46385bf1 100644 --- a/src/mongo/db/cst/SConscript +++ b/src/mongo/db/cst/SConscript @@ -22,7 +22,7 @@ env.Library( '$BUILD_DIR/mongo/db/pipeline/pipeline', '$BUILD_DIR/mongo/db/pipeline/variable_validation', '$BUILD_DIR/mongo/db/query/datetime/date_time_support', - ] + ], ) env.CppUnitTest( @@ -43,7 +43,7 @@ env.CppUnitTest( '$BUILD_DIR/mongo/db/matcher/expressions_mongod_only', '$BUILD_DIR/mongo/db/query/query_test_service_context', 'cst', - ] + ], ) env.CppUnitTest( @@ -56,7 +56,7 @@ env.CppUnitTest( LIBDEPS=[ '$BUILD_DIR/mongo/db/query/query_test_service_context', 'cst', - ] + ], ) # Disabled under SERVER-64949. # env.Benchmark( diff --git a/src/mongo/db/exec/SConscript b/src/mongo/db/exec/SConscript index c2caf69f0f2..b2368e49830 100644 --- a/src/mongo/db/exec/SConscript +++ b/src/mongo/db/exec/SConscript @@ -16,11 +16,11 @@ env.SConscript( # WorkingSet target and associated test env.Library( - target = "working_set", - source = [ + target="working_set", + source=[ "working_set.cpp", ], - LIBDEPS = [ + LIBDEPS=[ "$BUILD_DIR/mongo/base", "$BUILD_DIR/mongo/db/bson/dotted_path_support", "$BUILD_DIR/mongo/db/service_context", @@ -29,21 +29,21 @@ env.Library( ) env.Library( - target = "scoped_timer", - source = [ + target="scoped_timer", + source=[ "scoped_timer.cpp", ], - LIBDEPS = [ + LIBDEPS=[ '$BUILD_DIR/mongo/util/net/network', ], ) env.Library( - target = "js_function", - source = [ + target="js_function", + source=[ "js_function.cpp", ], - LIBDEPS = [ + LIBDEPS=[ '$BUILD_DIR/mongo/db/auth/auth', '$BUILD_DIR/mongo/db/query/query_knobs', '$BUILD_DIR/mongo/db/service_context', @@ -52,15 +52,15 @@ env.Library( ) env.Library( - target = "bucket_unpacker", - source = [ + target="bucket_unpacker", + source=[ "bucket_unpacker.cpp", ], - LIBDEPS = [ + LIBDEPS=[ "$BUILD_DIR/mongo/db/matcher/expressions", "document_value/document_value", ], - LIBDEPS_PRIVATE = [ + LIBDEPS_PRIVATE=[ "$BUILD_DIR/mongo/bson/util/bson_column", "$BUILD_DIR/mongo/db/timeseries/timeseries_options", ], @@ -95,17 +95,17 @@ env.Library( 'inclusion_projection_executor.cpp', 'projection_executor_builder.cpp', 'projection_executor_utils.cpp', - 'projection_node.cpp' + 'projection_node.cpp', ], LIBDEPS=[ - '$BUILD_DIR/mongo/db/matcher/expressions' + '$BUILD_DIR/mongo/db/matcher/expressions', ], ) env.Library( target='stagedebug_cmd', source=[ - 'stagedebug_cmd.cpp' + 'stagedebug_cmd.cpp', ], LIBDEPS=[ "$BUILD_DIR/mongo/db/index/index_access_methods", @@ -139,7 +139,7 @@ env.CppUnitTest( ], LIBDEPS=[ "$BUILD_DIR/mongo/base", - "$BUILD_DIR/mongo/bson/util/bson_column", + "$BUILD_DIR/mongo/bson/util/bson_column", "$BUILD_DIR/mongo/db/auth/authmocks", "$BUILD_DIR/mongo/db/query/collation/collator_factory_mock", "$BUILD_DIR/mongo/db/query/collation/collator_interface_mock", diff --git a/src/mongo/db/exec/document_value/SConscript b/src/mongo/db/exec/document_value/SConscript index 41e729f9a4c..cce805bac71 100644 --- a/src/mongo/db/exec/document_value/SConscript +++ b/src/mongo/db/exec/document_value/SConscript @@ -10,14 +10,14 @@ env.Library( 'document_metadata_fields.cpp', 'value.cpp', 'value_comparator.cpp', - ], + ], LIBDEPS=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/db/pipeline/field_path', '$BUILD_DIR/mongo/db/query/datetime/date_time_support', '$BUILD_DIR/mongo/util/intrusive_counter', - ] - ) + ], +) env.Library( target='document_value_test_util', diff --git a/src/mongo/db/exec/sbe/SConscript b/src/mongo/db/exec/sbe/SConscript index c2731874467..6a2503d7f26 100644 --- a/src/mongo/db/exec/sbe/SConscript +++ b/src/mongo/db/exec/sbe/SConscript @@ -6,11 +6,11 @@ env.Library( target='query_sbe_plan_stats', source=[ 'stages/plan_stats.cpp', - ], + ], LIBDEPS=[ '$BUILD_DIR/mongo/base', - ] - ) + ], +) env.Library( target='query_sbe_values', @@ -29,7 +29,7 @@ env.Library( '$BUILD_DIR/mongo/db/query/query_index_bounds', '$BUILD_DIR/mongo/db/storage/key_string', '$BUILD_DIR/mongo/util/regex_util', - ] + ], ) sbeEnv = env.Clone() @@ -50,19 +50,19 @@ sbeEnv.Library( 'vm/arith.cpp', 'vm/datetime.cpp', 'vm/vm.cpp', - ], + ], LIBDEPS=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/db/mongohasher', '$BUILD_DIR/mongo/db/storage/record_store_base', '$BUILD_DIR/third_party/shim_snappy', 'query_sbe_values', - ], + ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/bson/dotted_path_support', '$BUILD_DIR/mongo/db/sorter/sorter_idl', - ] - ) + ], +) sbeEnv.Library( target='query_sbe_stages', @@ -87,7 +87,7 @@ sbeEnv.Library( 'stages/union.cpp', 'stages/unique.cpp', 'stages/unwind.cpp', - ], + ], LIBDEPS=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/db/concurrency/lock_manager', @@ -103,14 +103,14 @@ sbeEnv.Library( '$BUILD_DIR/third_party/shim_snappy', 'query_sbe_plan_stats', 'query_sbe_values', - ], + ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/bson/dotted_path_support', '$BUILD_DIR/mongo/db/sorter/sorter_idl', 'query_sbe', 'query_sbe_storage', - ] - ) + ], +) env.Library( target='query_sbe_storage', @@ -119,27 +119,25 @@ env.Library( 'stages/column_scan.cpp', 'stages/ix_scan.cpp', 'stages/scan.cpp', - ], + ], LIBDEPS=[ - '$BUILD_DIR/mongo/db/db_raii', - '$BUILD_DIR/mongo/db/index/index_access_method', - '$BUILD_DIR/mongo/db/storage/execution_context', - 'query_sbe' - ] - ) + '$BUILD_DIR/mongo/db/db_raii', '$BUILD_DIR/mongo/db/index/index_access_method', + '$BUILD_DIR/mongo/db/storage/execution_context', 'query_sbe' + ], +) env.Library( target='query_sbe_abt', source=[ 'abt/abt_lower.cpp', - ], + ], LIBDEPS=[ '$BUILD_DIR/mongo/db/query/optimizer/optimizer', 'query_sbe', 'query_sbe_stages', 'query_sbe_storage', - ] - ) + ], +) env.Library( target='sbe_plan_stage_test', @@ -216,7 +214,7 @@ env.CppUnitTest( 'values/slot_printer_test.cpp', 'values/value_serialization_test.cpp', "values/value_test.cpp", - 'values/write_value_to_stream_test.cpp' + 'values/write_value_to_stream_test.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/db/auth/authmocks', @@ -233,15 +231,15 @@ env.Library( target='sbe_abt_test_util', source=[ 'abt/sbe_abt_test_util.cpp', - ], + ], LIBDEPS=[ - "$BUILD_DIR/mongo/db/auth/authmocks", - '$BUILD_DIR/mongo/db/query/query_test_service_context', - '$BUILD_DIR/mongo/db/query_exec', - '$BUILD_DIR/mongo/db/service_context_test_fixture', - 'query_sbe_abt', - ] - ) + "$BUILD_DIR/mongo/db/auth/authmocks", + '$BUILD_DIR/mongo/db/query/query_test_service_context', + '$BUILD_DIR/mongo/db/query_exec', + '$BUILD_DIR/mongo/db/service_context_test_fixture', + 'query_sbe_abt', + ], +) env.CppUnitTest( target='sbe_abt_test', @@ -251,6 +249,6 @@ env.CppUnitTest( ], LIBDEPS=[ '$BUILD_DIR/mongo/unittest/unittest', - 'sbe_abt_test_util' + 'sbe_abt_test_util', ], ) diff --git a/src/mongo/db/free_mon/SConscript b/src/mongo/db/free_mon/SConscript index c1fe6d83627..949e1cc31ae 100644 --- a/src/mongo/db/free_mon/SConscript +++ b/src/mongo/db/free_mon/SConscript @@ -68,7 +68,6 @@ else: ], ) - fmEnv.CppUnitTest( target='db_free_mon_test', source=[ diff --git a/src/mongo/db/ftdc/SConscript b/src/mongo/db/ftdc/SConscript index 72a96523195..ccbb8d4d8e3 100644 --- a/src/mongo/db/ftdc/SConscript +++ b/src/mongo/db/ftdc/SConscript @@ -21,14 +21,14 @@ ftdcEnv.Library( 'file_reader.cpp', 'file_writer.cpp', 'util.cpp', - 'varint.cpp' + 'varint.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/bson/util/bson_extract', '$BUILD_DIR/mongo/db/server_options_core', '$BUILD_DIR/mongo/db/service_context', - '$BUILD_DIR/third_party/s2/s2', # For VarInt + '$BUILD_DIR/third_party/s2/s2', # For VarInt '$BUILD_DIR/third_party/shim_zlib', ], ) @@ -51,7 +51,7 @@ env.Library( '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/db/commands', '$BUILD_DIR/mongo/util/processinfo', - 'ftdc' + 'ftdc', ] + platform_libs, LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/idl/server_parameter', @@ -77,7 +77,7 @@ env.Library( '$BUILD_DIR/mongo/db/auth/authprivilege', '$BUILD_DIR/mongo/db/storage/storage_options', '$BUILD_DIR/mongo/idl/server_parameter', - 'ftdc_server' + 'ftdc_server', ], ) diff --git a/src/mongo/db/fts/SConscript b/src/mongo/db/fts/SConscript index c6ceb5abb4d..a7a6f125c42 100644 --- a/src/mongo/db/fts/SConscript +++ b/src/mongo/db/fts/SConscript @@ -31,14 +31,18 @@ stop_word_languages = [ 'turkish', ] -generateStopWordsList = env.Command( [ "stop_words_list.h", "stop_words_list.cpp"], - [ "generate_stop_words.py"] + [ 'stop_words_%s.txt' % x for x in stop_word_languages ], - "$PYTHON $SOURCES $TARGETS" ) +generateStopWordsList = env.Command( + ["stop_words_list.h", "stop_words_list.cpp"], + ["generate_stop_words.py"] + ['stop_words_%s.txt' % x for x in stop_word_languages], + "$PYTHON $SOURCES $TARGETS", +) env.Alias('generated-sources', generateStopWordsList) -baseEnv=env.Clone() +baseEnv = env.Clone() baseEnv.InjectThirdParty(libraries=['stemmer']) -baseEnv.Library('base_fts', [ +baseEnv.Library( + 'base_fts', + [ 'fts_index_format.cpp', 'fts_matcher.cpp', 'fts_query_impl.cpp', @@ -56,14 +60,17 @@ baseEnv.Library('base_fts', [ 'stop_words.cpp', 'stop_words_list.cpp', 'tokenizer.cpp', - ], LIBDEPS=["$BUILD_DIR/mongo/base", - "$BUILD_DIR/mongo/db/bson/dotted_path_support", - "$BUILD_DIR/mongo/db/common", - "$BUILD_DIR/mongo/db/fts/unicode/unicode", - "$BUILD_DIR/mongo/db/matcher/expressions", - "$BUILD_DIR/mongo/util/md5", - "$BUILD_DIR/third_party/shim_stemmer", - ]) + ], + LIBDEPS=[ + "$BUILD_DIR/mongo/base", + "$BUILD_DIR/mongo/db/bson/dotted_path_support", + "$BUILD_DIR/mongo/db/common", + "$BUILD_DIR/mongo/db/fts/unicode/unicode", + "$BUILD_DIR/mongo/db/matcher/expressions", + "$BUILD_DIR/mongo/util/md5", + "$BUILD_DIR/third_party/shim_stemmer", + ], +) env.Library( target='fts_query_noop', diff --git a/src/mongo/db/fts/unicode/SConscript b/src/mongo/db/fts/unicode/SConscript index 2b783364d64..1571f1403c3 100644 --- a/src/mongo/db/fts/unicode/SConscript +++ b/src/mongo/db/fts/unicode/SConscript @@ -4,36 +4,39 @@ Import("env") env = env.Clone() -env.Command( +env.Command( target="codepoints_casefold.cpp", source=[ "gen_casefold_map.py", "#/src/third_party/unicode-8.0.0/CaseFolding.txt", "gen_helper.py", ], - action="$PYTHON ${SOURCES[0]} ${SOURCES[1]} $TARGETS") + action="$PYTHON ${SOURCES[0]} ${SOURCES[1]} $TARGETS", +) env.Alias('generated-sources', "codepoints_casefold.cpp") -env.Command( +env.Command( target="codepoints_delimiter_list.cpp", source=[ "gen_delimiter_list.py", "#/src/third_party/unicode-8.0.0/PropList.txt", "gen_helper.py", ], - action="$PYTHON ${SOURCES[0]} ${SOURCES[1]} $TARGETS") + action="$PYTHON ${SOURCES[0]} ${SOURCES[1]} $TARGETS", +) env.Alias('generated-sources', "codepoints_delimiter_list.cpp") -env.Command( +env.Command( target="codepoints_diacritic_list.cpp", source=[ "gen_diacritic_list.py", "#/src/third_party/unicode-8.0.0/PropList.txt", "gen_helper.py", ], - action="$PYTHON ${SOURCES[0]} ${SOURCES[1]} $TARGETS") + action="$PYTHON ${SOURCES[0]} ${SOURCES[1]} $TARGETS", +) env.Alias('generated-sources', "codepoints_diacritic_list.cpp") @@ -49,7 +52,7 @@ env.Library( LIBDEPS=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/shell/linenoise_utf8', - ] + ], ) env.CppUnitTest( diff --git a/src/mongo/db/geo/SConscript b/src/mongo/db/geo/SConscript index 1a32eefac8a..e43299f0d2a 100644 --- a/src/mongo/db/geo/SConscript +++ b/src/mongo/db/geo/SConscript @@ -7,33 +7,23 @@ env = env.Clone() # Core geometry shape libraries env.Library( target="geometry", - source=[ - "hash.cpp", - "shapes.cpp", - "big_polygon.cpp", - "r2_region_coverer.cpp" - ], + source=["hash.cpp", "shapes.cpp", "big_polygon.cpp", "r2_region_coverer.cpp"], LIBDEPS=[ - "$BUILD_DIR/mongo/base", - "$BUILD_DIR/mongo/db/common", - "$BUILD_DIR/mongo/db/storage/key_string", - "$BUILD_DIR/third_party/s2/s2" - ] + "$BUILD_DIR/mongo/base", "$BUILD_DIR/mongo/db/common", + "$BUILD_DIR/mongo/db/storage/key_string", "$BUILD_DIR/third_party/s2/s2" + ], ) # Geometry / BSON parsing and wrapping env.Library( target="geoparser", - source=[ - "geoparser.cpp", - "geometry_container.cpp" - ], + source=["geoparser.cpp", "geometry_container.cpp"], LIBDEPS=[ "$BUILD_DIR/mongo/base", "$BUILD_DIR/mongo/db/bson/dotted_path_support", "$BUILD_DIR/third_party/s2/s2", "geometry", - ] + ], ) env.CppUnitTest( @@ -48,5 +38,5 @@ env.CppUnitTest( "$BUILD_DIR/mongo/db/common", "geometry", "geoparser", - ] + ], ) diff --git a/src/mongo/db/index/SConscript b/src/mongo/db/index/SConscript index b8e2be6c825..9ccff04ff89 100644 --- a/src/mongo/db/index/SConscript +++ b/src/mongo/db/index/SConscript @@ -60,10 +60,7 @@ env.Benchmark( env.Library( target='expression_params', - source=[ - 'expression_params.cpp', - 's2_common.cpp' - ], + source=['expression_params.cpp', 's2_common.cpp'], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/bson/util/bson_extract', @@ -73,7 +70,7 @@ env.Library( '$BUILD_DIR/mongo/db/query/collation/collator_interface', '$BUILD_DIR/mongo/db/storage/key_string', '$BUILD_DIR/third_party/s2/s2', - ] + ], ) env.Library( @@ -145,7 +142,7 @@ env.Library( 'columnar_index', 'expression_params', 'key_generator', - ] + ], ) env.Library( @@ -155,7 +152,7 @@ env.Library( ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/base', - ] + ], ) env.CppUnitTest( diff --git a/src/mongo/db/matcher/SConscript b/src/mongo/db/matcher/SConscript index 4d484b0fadb..a53845a04f4 100644 --- a/src/mongo/db/matcher/SConscript +++ b/src/mongo/db/matcher/SConscript @@ -8,7 +8,7 @@ env.Library( target='path', source=[ 'path.cpp', - 'path_internal.cpp' + 'path_internal.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/base', diff --git a/src/mongo/db/ops/SConscript b/src/mongo/db/ops/SConscript index 999ff2b85fe..0b736897acc 100644 --- a/src/mongo/db/ops/SConscript +++ b/src/mongo/db/ops/SConscript @@ -79,7 +79,7 @@ env.Library( source='parsed_update.cpp', LIBDEPS=[ '$BUILD_DIR/mongo/db/update/update_driver', - 'parsed_update_array_filters' + 'parsed_update_array_filters', ], ) diff --git a/src/mongo/db/pipeline/SConscript b/src/mongo/db/pipeline/SConscript index ddde981fbb9..c1cf7801e29 100644 --- a/src/mongo/db/pipeline/SConscript +++ b/src/mongo/db/pipeline/SConscript @@ -17,9 +17,9 @@ env.SConscript( env.Library( target='change_stream_pre_and_post_images_options', source=[ - 'change_stream_pre_and_post_images_options.idl' + 'change_stream_pre_and_post_images_options.idl', ], - LIBDEPS=[ + LIBDEPS=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/idl/idl_parser', ], @@ -46,21 +46,21 @@ env.Library( 'aggregation_request_helper', 'expression_context', 'pipeline', - ] + ], ) env.Library( target='field_path', source=[ 'field_path.cpp', - ], + ], LIBDEPS=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/db/query/query_knobs', '$BUILD_DIR/mongo/db/server_options', '$BUILD_DIR/mongo/idl/feature_flag', - ] - ) + ], +) env.Library( target='aggregation_request_helper', @@ -80,7 +80,7 @@ env.Library( '$BUILD_DIR/mongo/db/write_concern_options', '$BUILD_DIR/mongo/idl/idl_parser', 'document_sources_idl', - ] + ], ) env.Library( @@ -90,7 +90,7 @@ env.Library( ], LIBDEPS=[ '$BUILD_DIR/mongo/base', - ] + ], ) env.Library( target='expression_context', @@ -135,11 +135,11 @@ env.Library( target='dependencies', source=[ 'dependencies.cpp', - ], + ], LIBDEPS=[ '$BUILD_DIR/mongo/db/exec/document_value/document_value', 'field_path', - ] + ], ) env.Library( @@ -169,7 +169,7 @@ env.Library( 'window_function/window_function_integral.cpp', 'window_function/window_function_shift.cpp', 'window_function/window_function_sum.cpp', - ], + ], LIBDEPS=[ '$BUILD_DIR/mongo/db/exec/document_value/document_value', '$BUILD_DIR/mongo/db/query/query_knobs', @@ -179,9 +179,8 @@ env.Library( 'field_path', ], LIBDEPS_PRIVATE=[ - '$BUILD_DIR/mongo/db/exec/sort_executor', - '$BUILD_DIR/mongo/db/index/key_generator' - ] + '$BUILD_DIR/mongo/db/exec/sort_executor', '$BUILD_DIR/mongo/db/index/key_generator' + ], ) env.Library( @@ -190,12 +189,12 @@ env.Library( 'granularity_rounder.cpp', 'granularity_rounder_powers_of_two.cpp', 'granularity_rounder_preferred_numbers.cpp', - ], + ], LIBDEPS=[ '$BUILD_DIR/mongo/db/exec/document_value/document_value', 'expression_context', 'field_path', - ] + ], ) env.Library( @@ -203,11 +202,11 @@ env.Library( source=[ 'document_source_mock.cpp', 'process_interface/stub_lookup_single_document_process_interface.cpp', - ], + ], LIBDEPS=[ '$BUILD_DIR/mongo/db/query/query_test_service_context', 'pipeline', - ] + ], ) env.Library( @@ -227,12 +226,12 @@ env.Library( source=[ 'lite_parsed_document_source.cpp', 'lite_parsed_pipeline.cpp', - ], + ], LIBDEPS=[ '$BUILD_DIR/mongo/db/query/common_query_enums_and_helpers', '$BUILD_DIR/mongo/db/stats/counters', 'aggregation_request_helper', - ] + ], ) env.Library( @@ -391,7 +390,7 @@ pipelineEnv.Library( '$BUILD_DIR/mongo/db/timeseries/timeseries_conversion_util', '$BUILD_DIR/mongo/db/timeseries/timeseries_options', '$BUILD_DIR/mongo/rpc/command_status', - ] + ], ) env.Library( @@ -441,7 +440,6 @@ env.Library( ], ) - env.Library( target='runtime_constants_idl', source=[ @@ -487,7 +485,7 @@ env.Library( env.Library( target='change_stream_expired_pre_image_remover', source=[ - 'change_stream_expired_pre_image_remover.cpp' + 'change_stream_expired_pre_image_remover.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/db/change_stream_options_manager', @@ -499,13 +497,13 @@ env.Library( '$BUILD_DIR/mongo/db/repl/storage_interface', '$BUILD_DIR/mongo/util/periodic_runner', 'change_stream_preimage', - ] + ], ) env.Library( target='change_stream_pre_image_helpers', source=[ - 'change_stream_pre_image_helpers.cpp' + 'change_stream_pre_image_helpers.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/db/service_context', @@ -516,7 +514,7 @@ env.Library( '$BUILD_DIR/mongo/db/concurrency/lock_manager_defs', '$BUILD_DIR/mongo/db/dbhelpers', '$BUILD_DIR/mongo/db/namespace_string', - ] + ], ) env.Library( @@ -527,8 +525,7 @@ env.Library( LIBDEPS=[ "change_stream_pipeline", ], - LIBDEPS_PRIVATE=[ - ], + LIBDEPS_PRIVATE=[], ) env.CppUnitTest( @@ -686,7 +683,7 @@ env.CppUnitTest( 'process_interface/mongos_process_interface', 'process_interface/shardsvr_process_interface', 'sharded_agg_helpers', - ] + ], ) env.Benchmark( diff --git a/src/mongo/db/pipeline/process_interface/SConscript b/src/mongo/db/pipeline/process_interface/SConscript index c18bde43241..1230f427a39 100644 --- a/src/mongo/db/pipeline/process_interface/SConscript +++ b/src/mongo/db/pipeline/process_interface/SConscript @@ -129,5 +129,5 @@ env.CppUnitTest( '$BUILD_DIR/mongo/s/sharding_router_test_fixture', 'mongos_process_interface', 'shardsvr_process_interface', - ] + ], ) diff --git a/src/mongo/db/query/SConscript b/src/mongo/db/query/SConscript index 1f42baff54c..38ad7e51499 100644 --- a/src/mongo/db/query/SConscript +++ b/src/mongo/db/query/SConscript @@ -12,7 +12,7 @@ env.SConscript( 'optimizer', ], exports=[ - 'env' + 'env', ], ) @@ -86,7 +86,7 @@ env.Library( LIBDEPS=[ "$BUILD_DIR/mongo/base", "$BUILD_DIR/mongo/db/matcher/expressions", - ] + ], ) env.Library( @@ -101,7 +101,7 @@ env.Library( "$BUILD_DIR/mongo/base", "$BUILD_DIR/mongo/db/exec/sbe/query_sbe", "canonical_query", - ] + ], ) env.Library( @@ -268,7 +268,7 @@ env.Library( '$BUILD_DIR/mongo/idl/feature_flag', '$BUILD_DIR/mongo/idl/server_parameter', '$BUILD_DIR/third_party/shim_pcrecpp', - ] + ], ) env.Library( @@ -281,8 +281,7 @@ env.Library( "$BUILD_DIR/mongo/db/service_context", "collation/collator_factory_mock", ], - LIBDEPS_PRIVATE=[ - ], + LIBDEPS_PRIVATE=[], ) env.Library( @@ -329,7 +328,7 @@ env.Library( '$BUILD_DIR/mongo/db/exec/document_value/document_value', '$BUILD_DIR/mongo/db/pipeline/expression_context', ], - ) +) env.Library( target="plan_yield_policy", @@ -345,7 +344,7 @@ env.Library( '$BUILD_DIR/mongo/db/concurrency/exception_util', '$BUILD_DIR/mongo/db/storage/recovery_unit_base', ], - ) +) env.CppUnitTest( target="db_query_test", diff --git a/src/mongo/db/query/ce/SConscript b/src/mongo/db/query/ce/SConscript index 8ab2ca62f51..c570a88b23f 100644 --- a/src/mongo/db/query/ce/SConscript +++ b/src/mongo/db/query/ce/SConscript @@ -12,5 +12,5 @@ env.Library( LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/exec/sbe/query_sbe_abt', '$BUILD_DIR/mongo/db/query/optimizer/optimizer', - ] -)
\ No newline at end of file + ], +) diff --git a/src/mongo/db/query/collation/SConscript b/src/mongo/db/query/collation/SConscript index 653878dc5be..79578fe98b8 100644 --- a/src/mongo/db/query/collation/SConscript +++ b/src/mongo/db/query/collation/SConscript @@ -78,8 +78,7 @@ if not use_system_version_of_library("icu"): ("U_DISABLE_RENAMING", 1), ("U_STATIC_IMPLEMENTATION", 1), ("U_USING_ICU_NAMESPACE", 0), - ], - ) + ], ) icuEnv.Library( target="collator_icu", diff --git a/src/mongo/db/query/datetime/SConscript b/src/mongo/db/query/datetime/SConscript index e8a45118d4f..6bfd4e3ed63 100644 --- a/src/mongo/db/query/datetime/SConscript +++ b/src/mongo/db/query/datetime/SConscript @@ -8,25 +8,21 @@ timeZoneEnv = env.Clone() timeZoneEnv.InjectThirdParty(libraries=['timelib']) timeZoneEnv.Library( target='date_time_support', - source=[ - 'date_time_support.cpp' - ], + source=['date_time_support.cpp'], LIBDEPS=[ '$BUILD_DIR/mongo/db/service_context', '$BUILD_DIR/third_party/shim_timelib', - ] + ], ) timeZoneEnv.Library( target='init_timezone_data', - source=[ - 'init_timezone_data.cpp' - ], + source=['init_timezone_data.cpp'], LIBDEPS=[ '$BUILD_DIR/mongo/db/server_options_core', '$BUILD_DIR/third_party/shim_timelib', 'date_time_support', - ] + ], ) timeZoneEnv.CppUnitTest( @@ -36,7 +32,7 @@ timeZoneEnv.CppUnitTest( ], LIBDEPS=[ 'date_time_support', - ] + ], ) timeZoneEnv.CppLibfuzzerTest( @@ -46,5 +42,5 @@ timeZoneEnv.CppLibfuzzerTest( ], LIBDEPS=[ 'date_time_support', - ] + ], ) diff --git a/src/mongo/db/query/optimizer/SConscript b/src/mongo/db/query/optimizer/SConscript index 6d49e5d92bd..c91ceec6cae 100644 --- a/src/mongo/db/query/optimizer/SConscript +++ b/src/mongo/db/query/optimizer/SConscript @@ -9,7 +9,7 @@ env.SConscript( "algebra", ], exports=[ - 'env' + 'env', ], ) @@ -41,7 +41,7 @@ env.Library( "utils/abt_hash.cpp", "utils/interval_utils.cpp", "utils/memo_utils.cpp", - "utils/utils.cpp" + "utils/utils.cpp", ], LIBDEPS=[ "$BUILD_DIR/mongo/db/exec/sbe/query_sbe_values", @@ -73,5 +73,5 @@ env.CppUnitTest( LIBDEPS=[ "optimizer", "unit_test_utils", - ] + ], ) diff --git a/src/mongo/db/query/optimizer/algebra/SConscript b/src/mongo/db/query/optimizer/algebra/SConscript index 0d2a48c24d3..b6a73de1e35 100644 --- a/src/mongo/db/query/optimizer/algebra/SConscript +++ b/src/mongo/db/query/optimizer/algebra/SConscript @@ -9,7 +9,5 @@ env.CppUnitTest( source=[ 'algebra_test.cpp', ], - LIBDEPS=[ - - ] + LIBDEPS=[], ) diff --git a/src/mongo/db/repl/SConscript b/src/mongo/db/repl/SConscript index f12237cf395..7f496a55383 100644 --- a/src/mongo/db/repl/SConscript +++ b/src/mongo/db/repl/SConscript @@ -14,7 +14,7 @@ env.Library( '$BUILD_DIR/mongo/client/read_preference', '$BUILD_DIR/mongo/idl/feature_flag', '$BUILD_DIR/mongo/idl/server_parameter', - ] + ], ) env.Library( @@ -24,7 +24,7 @@ env.Library( ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/base', - ] + ], ) env.Library( @@ -36,7 +36,7 @@ env.Library( LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/base', 'oplog_entry', - ] + ], ) env.Library( @@ -127,7 +127,7 @@ env.Library( ], LIBDEPS_PRIVATE=[ 'replication_auth', - ] + ], ) env.Library( @@ -173,7 +173,7 @@ env.Library( ], LIBDEPS_PRIVATE=[ 'repl_server_parameters', - ] + ], ) env.Library( @@ -296,8 +296,7 @@ env.Library( source=[ 'replication_recovery.cpp', ], - LIBDEPS=[ - ], + LIBDEPS=[], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/db/index_builds_coordinator_interface', @@ -389,7 +388,6 @@ env.Library( ], ) - env.Library( target='oplog_interface_local', source=[ @@ -550,7 +548,7 @@ env.Library( env.Library( target='optime_base', source=[ - 'optime_base.idl' + 'optime_base.idl', ], LIBDEPS=[ '$BUILD_DIR/mongo/base', @@ -626,7 +624,7 @@ env.Library( '$BUILD_DIR/mongo/db/namespace_string', 'oplog_entry', 'optime', - ] + ], ) env.Library( @@ -639,7 +637,7 @@ env.Library( LIBDEPS=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/db/common', - '$BUILD_DIR/mongo/db/exec/document_value/document_value' + '$BUILD_DIR/mongo/db/exec/document_value/document_value', ], ) @@ -662,7 +660,7 @@ env.Library( ], LIBDEPS=[ 'replica_set_messages', - ] + ], ) env.Library( @@ -686,7 +684,7 @@ env.Library( '$BUILD_DIR/mongo/db/catalog/commit_quorum_options', '$BUILD_DIR/mongo/idl/server_parameter', 'repl_server_parameters', - ] + ], ) env.Library( @@ -816,26 +814,30 @@ env.Library( ], ) -env.Library('read_concern_args', - [ - 'read_concern_args.cpp' - ], - LIBDEPS=[ - '$BUILD_DIR/mongo/base', - '$BUILD_DIR/mongo/bson/util/bson_extract', - '$BUILD_DIR/mongo/db/logical_time', - '$BUILD_DIR/mongo/db/read_write_concern_provenance', - 'optime', - ]) +env.Library( + 'read_concern_args', + [ + 'read_concern_args.cpp', + ], + LIBDEPS=[ + '$BUILD_DIR/mongo/base', + '$BUILD_DIR/mongo/bson/util/bson_extract', + '$BUILD_DIR/mongo/db/logical_time', + '$BUILD_DIR/mongo/db/read_write_concern_provenance', + 'optime', + ], +) -env.Library('speculative_majority_read_info', - [ - 'speculative_majority_read_info.cpp' - ], - LIBDEPS=[ - '$BUILD_DIR/mongo/base', - 'optime', - ]) +env.Library( + 'speculative_majority_read_info', + [ + 'speculative_majority_read_info.cpp', + ], + LIBDEPS=[ + '$BUILD_DIR/mongo/base', + 'optime', + ], +) env.Library( target='replica_set_messages', @@ -873,7 +875,7 @@ env.Library( '$BUILD_DIR/mongo/idl/server_parameter', 'repl_server_parameters', 'split_horizon', - ] + ], ) env.Library( @@ -1027,7 +1029,7 @@ env.Library( '$BUILD_DIR/mongo/util/progress_meter', 'repl_server_parameters', 'replication_auth', - ] + ], ) env.Library( @@ -1056,7 +1058,7 @@ env.Library( '$BUILD_DIR/mongo/util/progress_meter', 'oplog', 'repl_server_parameters', - ] + ], ) env.Library( @@ -1149,7 +1151,7 @@ env.Library( ], LIBDEPS=[ '$BUILD_DIR/mongo/base', - ] + ], ) env.Library( @@ -1166,7 +1168,7 @@ env.Library( LIBDEPS_PRIVATE=[ 'repl_server_parameters', 'replication_consistency_markers_impl', - ] + ], ) env.Library( @@ -1184,7 +1186,7 @@ env.Library( '$BUILD_DIR/mongo/db/namespace_string', '$BUILD_DIR/mongo/idl/idl_parser', 'read_concern_args', - ] + ], ) env.Library( @@ -1210,14 +1212,14 @@ env.Library( 'repl_sync_shared_data', 'rollback_checker', 'storage_interface', - 'tenant_migration_access_blocker' + 'tenant_migration_access_blocker', ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/commands/feature_compatibility_parsers', '$BUILD_DIR/mongo/db/index_builds_coordinator_interface', '$BUILD_DIR/mongo/executor/scoped_task_executor', 'repl_server_parameters', - ] + ], ) env.Library( @@ -1401,7 +1403,7 @@ env.Library( 'tenant_migration_cloners', 'tenant_migration_state_machine_idl', 'tenant_oplog_processing', - ] + ], ) env.Library( @@ -1430,7 +1432,7 @@ env.Library( 'repl_coordinator_interface', 'tenant_migration_decoration', 'tenant_migration_errors', - 'tenant_migration_state_machine_idl' + 'tenant_migration_state_machine_idl', ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/catalog/local_oplog_info', @@ -1530,7 +1532,7 @@ env.Library( 'oplog', 'oplog_entry', 'replmocks', - ] + ], ) env.Library( @@ -1611,7 +1613,7 @@ if wiredtiger: '$BUILD_DIR/mongo/util/version_impl', 'idempotency_test_fixture', 'tenant_migration_donor_service', - ] + ], ) env.CppUnitTest( @@ -1779,7 +1781,7 @@ env.CppUnitTest( 'repl_coordinator_test_fixture', 'repl_server_parameters', 'topology_coordinator', - ] + ], ) env.CppUnitTest( @@ -1793,7 +1795,7 @@ env.CppUnitTest( 'repl_coordinator_impl', 'repl_coordinator_test_fixture', 'topology_version_observer', - ] + ], ) env.Library( @@ -1960,7 +1962,7 @@ env.Library( target='tenant_oplog_processing', source=[ 'tenant_oplog_batcher.cpp', - 'tenant_oplog_applier.cpp' + 'tenant_oplog_applier.cpp', ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/base', @@ -1970,7 +1972,7 @@ env.Library( 'oplog', 'oplog_application', 'oplog_application_interface', - 'repl_server_parameters' + 'repl_server_parameters', ], ) diff --git a/src/mongo/db/s/SConscript b/src/mongo/db/s/SConscript index 3d14f8ee931..d6900c40b54 100644 --- a/src/mongo/db/s/SConscript +++ b/src/mongo/db/s/SConscript @@ -36,8 +36,8 @@ env.Library( '$BUILD_DIR/mongo/s/sharding_routing_table', ], LIBDEPS_PRIVATE=[ - '$BUILD_DIR/mongo/db/write_block_bypass' - ] + '$BUILD_DIR/mongo/db/write_block_bypass', + ], ) env.Library( @@ -187,7 +187,7 @@ env.Library( '$BUILD_DIR/mongo/db/repl/replica_set_aware_service', '$BUILD_DIR/mongo/db/rw_concern_d', 'sharding_api_d', - ] + ], ) env.Library( @@ -222,14 +222,14 @@ env.Library( '$BUILD_DIR/mongo/executor/task_executor_pool', '$BUILD_DIR/mongo/s/grid', 'sharding_api_d', - ] + ], ) env.Library( target='forwardable_operation_metadata', source=[ 'forwardable_operation_metadata.cpp', - 'forwardable_operation_metadata.idl' + 'forwardable_operation_metadata.idl', ], LIBDEPS=[ '$BUILD_DIR/mongo/base', @@ -237,7 +237,7 @@ env.Library( ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/write_block_bypass', - ] + ], ) env.Library( @@ -485,7 +485,7 @@ env.Library( '$BUILD_DIR/mongo/db/pipeline/sharded_agg_helpers', '$BUILD_DIR/mongo/s/sessions_collection_sharded', '$BUILD_DIR/mongo/s/sharding_api', - ] + ], ) env.Library( @@ -676,7 +676,7 @@ env.CppUnitTest( 'topology_time_ticker_test.cpp', 'type_lockpings_test.cpp', 'type_locks_test.cpp', - 'vector_clock_config_server_test.cpp' + 'vector_clock_config_server_test.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/db/auth/authmocks', @@ -701,7 +701,7 @@ env.Benchmark( LIBDEPS=[ '$BUILD_DIR/mongo/db/auth/authmocks', '$BUILD_DIR/mongo/db/auth/authorization_manager_global', - 'sharding_runtime_d' + 'sharding_runtime_d', ], ) diff --git a/src/mongo/db/serverless/SConscript b/src/mongo/db/serverless/SConscript index e724d78a83e..a06609a6e55 100644 --- a/src/mongo/db/serverless/SConscript +++ b/src/mongo/db/serverless/SConscript @@ -11,7 +11,7 @@ env.Library( LIBDEPS=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/idl/basic_types', - '$BUILD_DIR/mongo/idl/idl_parser' + '$BUILD_DIR/mongo/idl/idl_parser', ], ) @@ -24,7 +24,7 @@ env.Library( '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/client/connection_string', '$BUILD_DIR/mongo/db/repl/tenant_migration_utils', - '$BUILD_DIR/mongo/idl/idl_parser' + '$BUILD_DIR/mongo/idl/idl_parser', ], ) @@ -42,20 +42,20 @@ env.Library( '$BUILD_DIR/mongo/db/repl/tenant_migration_utils', '$BUILD_DIR/mongo/idl/idl_parser', 'shard_split_donor_service', - ] + ], ) env.Library( target='shard_split_utils', source=[ - 'shard_split_utils.cpp' + 'shard_split_utils.cpp', ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/concurrency/exception_util', '$BUILD_DIR/mongo/db/dbhelpers', '$BUILD_DIR/mongo/db/repl/replica_set_messages', 'shard_split_state_machine', - ] + ], ) env.Library( @@ -78,8 +78,8 @@ env.Library( '$BUILD_DIR/mongo/db/namespace_string', '$BUILD_DIR/mongo/db/repl/oplog', '$BUILD_DIR/mongo/db/repl/tenant_migration_access_blocker', - 'shard_split_utils' - ] + 'shard_split_utils', + ], ) env.CppUnitTest( @@ -99,5 +99,5 @@ env.CppUnitTest( '$BUILD_DIR/mongo/dbtests/mocklib', 'shard_split_donor_service', 'shard_split_utils', - ] + ], ) diff --git a/src/mongo/db/sorter/SConscript b/src/mongo/db/sorter/SConscript index ae8184f222d..fc796b9319f 100644 --- a/src/mongo/db/sorter/SConscript +++ b/src/mongo/db/sorter/SConscript @@ -29,5 +29,5 @@ env.Library( LIBDEPS=[ "$BUILD_DIR/mongo/base", '$BUILD_DIR/mongo/idl/idl_parser', - ] + ], ) diff --git a/src/mongo/db/stats/SConscript b/src/mongo/db/stats/SConscript index 17bbe0cb144..4769af29bea 100644 --- a/src/mongo/db/stats/SConscript +++ b/src/mongo/db/stats/SConscript @@ -19,7 +19,7 @@ env.Library( target='top', source=[ 'top.cpp', - 'operation_latency_histogram.cpp' + 'operation_latency_histogram.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/db/server_options_core', @@ -38,7 +38,7 @@ env.Library( LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/shared_request_handling', '$BUILD_DIR/mongo/rpc/client_metadata', - ] + ], ) env.Library( @@ -94,7 +94,7 @@ env.Library( env.Library( target="transaction_stats", source=[ - "single_transaction_stats.cpp" + "single_transaction_stats.cpp", ], LIBDEPS=[ '$BUILD_DIR/mongo/base', @@ -109,7 +109,7 @@ env.Library( ], LIBDEPS=[ '$BUILD_DIR/mongo/base', - '$BUILD_DIR/mongo/db/concurrency/lock_manager' + '$BUILD_DIR/mongo/db/concurrency/lock_manager', ], ) @@ -126,9 +126,9 @@ env.Library( '$BUILD_DIR/mongo/db/catalog/index_catalog', '$BUILD_DIR/mongo/db/commands/server_status', '$BUILD_DIR/mongo/db/db_raii', - '$BUILD_DIR/mongo/db/dbdirectclient', # TODO (SERVER-64162) remove + '$BUILD_DIR/mongo/db/dbdirectclient', # TODO (SERVER-64162) remove '$BUILD_DIR/mongo/db/index/index_access_method', - '$BUILD_DIR/mongo/db/pipeline/aggregation_request_helper', # TODO (SERVER-64162) remove + '$BUILD_DIR/mongo/db/pipeline/aggregation_request_helper', # TODO (SERVER-64162) remove '$BUILD_DIR/mongo/db/pipeline/document_sources_idl', '$BUILD_DIR/mongo/db/timeseries/bucket_catalog', '$BUILD_DIR/mongo/db/timeseries/timeseries_stats', diff --git a/src/mongo/db/storage/SConscript b/src/mongo/db/storage/SConscript index 6097874f3f5..9ac78a1409f 100644 --- a/src/mongo/db/storage/SConscript +++ b/src/mongo/db/storage/SConscript @@ -10,7 +10,7 @@ env.SConscript( 'wiredtiger', ], exports=[ - 'env' + 'env', ], ) @@ -209,7 +209,7 @@ env.Library( ], LIBDEPS=[ '$BUILD_DIR/mongo/base', - '$BUILD_DIR/mongo/db/service_context' + '$BUILD_DIR/mongo/db/service_context', ], ) @@ -285,11 +285,10 @@ env.Library( ], ) - env.Library( target='recovery_unit_test_harness', source=[ - 'recovery_unit_test_harness.cpp' + 'recovery_unit_test_harness.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/db/concurrency/lock_manager', @@ -314,7 +313,7 @@ env.Library( env.Library( target='storage_change_lock', source=[ - 'storage_change_lock.cpp' + 'storage_change_lock.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/base', @@ -325,10 +324,9 @@ env.Library( target='storage_engine_common', source=[ 'storage_engine_init.cpp', - 'storage_engine_change_context.cpp' - ], - LIBDEPS=[ + 'storage_engine_change_context.cpp', ], + LIBDEPS=[], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/concurrency/lock_manager', '$BUILD_DIR/mongo/db/service_context', @@ -351,8 +349,8 @@ env.Library( ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/commands/server_status', - 'backup_cursor_hooks' - ] + 'backup_cursor_hooks', + ], ) env.Library( @@ -363,7 +361,7 @@ env.Library( LIBDEPS_PRIVATE=[ "$BUILD_DIR/mongo/base", '$BUILD_DIR/mongo/db/namespace_string', - ] + ], ) env.Library( @@ -420,7 +418,7 @@ env.Library( env.Benchmark( target='storage_key_string_bm', source=[ - 'key_string_bm.cpp' + 'key_string_bm.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/base', @@ -431,7 +429,7 @@ env.Benchmark( env.Benchmark( target='storage_record_id_bm', source=[ - 'record_id_bm.cpp' + 'record_id_bm.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/base', @@ -448,7 +446,7 @@ env.Library( '$BUILD_DIR/mongo/base', 'encryption_hooks', 'storage_options', - ] + ], ) env.Library( diff --git a/src/mongo/db/storage/kv/SConscript b/src/mongo/db/storage/kv/SConscript index 67f6904300a..9d98220d97d 100644 --- a/src/mongo/db/storage/kv/SConscript +++ b/src/mongo/db/storage/kv/SConscript @@ -35,4 +35,3 @@ env.Library( '$BUILD_DIR/mongo/util/clock_source_mock', ], ) - diff --git a/src/mongo/db/storage/wiredtiger/SConscript b/src/mongo/db/storage/wiredtiger/SConscript index 1d25c612bba..f322d6c6b92 100644 --- a/src/mongo/db/storage/wiredtiger/SConscript +++ b/src/mongo/db/storage/wiredtiger/SConscript @@ -15,7 +15,7 @@ env.Library( ], LIBDEPS=[ '$BUILD_DIR/mongo/base', - '$BUILD_DIR/mongo/db/service_context' + '$BUILD_DIR/mongo/db/service_context', ], ) @@ -157,7 +157,7 @@ wtEnv.CppUnitTest( '$BUILD_DIR/mongo/util/clock_source_mock', 'storage_wiredtiger', 'storage_wiredtiger_core', - ] + ], ) wtEnv.Library( @@ -197,7 +197,6 @@ wtEnv.Library( ], ) - wtEnv.Library( target='storage_wiredtiger_import', source=[ @@ -214,7 +213,6 @@ wtEnv.Library( ], ) - wtEnv.CppUnitTest( target='storage_wiredtiger_record_store_and_index_test', source=[ diff --git a/src/mongo/db/timeseries/SConscript b/src/mongo/db/timeseries/SConscript index 1e38fb6b81f..8aa49e5fd8c 100644 --- a/src/mongo/db/timeseries/SConscript +++ b/src/mongo/db/timeseries/SConscript @@ -15,7 +15,7 @@ env.Library( '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/idl/idl_parser', '$BUILD_DIR/mongo/idl/server_parameter', - '$BUILD_DIR/mongo/util/processinfo' + '$BUILD_DIR/mongo/util/processinfo', ], ) @@ -49,7 +49,7 @@ env.Library( '$BUILD_DIR/mongo/db/server_options_core', '$BUILD_DIR/mongo/db/storage/storage_options', '$BUILD_DIR/mongo/util/fail_point', - ] + ], ) env.Library( diff --git a/src/mongo/db/views/SConscript b/src/mongo/db/views/SConscript index 1515599e61b..c0b69a4e6ba 100644 --- a/src/mongo/db/views/SConscript +++ b/src/mongo/db/views/SConscript @@ -57,7 +57,7 @@ env.Library( LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/timeseries/timeseries_conversion_util', '$BUILD_DIR/mongo/db/timeseries/timeseries_options', - ] + ], ) env.CppUnitTest( diff --git a/src/mongo/dbtests/SConscript b/src/mongo/dbtests/SConscript index f735921a1df..59e5fe7547c 100644 --- a/src/mongo/dbtests/SConscript +++ b/src/mongo/dbtests/SConscript @@ -52,7 +52,7 @@ env.Library( 'mock/mock_conn_registry.cpp', 'mock/mock_dbclient_connection.cpp', 'mock/mock_remote_db_server.cpp', - 'mock/mock_replica_set.cpp' + 'mock/mock_replica_set.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/client/clientdriver_network', diff --git a/src/mongo/embedded/SConscript b/src/mongo/embedded/SConscript index 879b5033969..b4243ca1ebf 100644 --- a/src/mongo/embedded/SConscript +++ b/src/mongo/embedded/SConscript @@ -8,15 +8,14 @@ Import("wiredtiger") env = env.Clone() -env.AppendUnique( - CPPPATH=["$BUILD_DIR/mongo/embedded"], -) +env.AppendUnique(CPPPATH=["$BUILD_DIR/mongo/embedded"], ) # Inject this before we call the SDK directory SConscripts so that # they can both use it. sdkEnv = env.Clone() + def mongo_export_file_generator(target, source, env, for_signature): if env.ToolchainIs('msvc'): script = env.File(env.subst("${TARGET.base}.def", target=target)) @@ -30,6 +29,7 @@ def mongo_export_file_generator(target, source, env, for_signature): else: pass + # We really only want to use the mapfile if we are doing an SDK build. In an ordinary # dynamic build, we would end up building the normal library with an export map # but many of its symbols should in fact be coming from other libraries, and we @@ -44,7 +44,7 @@ env.SConscript( 'stitch_support', ], exports={ - 'env' : sdkEnv, + 'env': sdkEnv, }, ) @@ -116,8 +116,9 @@ env.Library( '$BUILD_DIR/mongo/db/vector_clock_trivial', '$BUILD_DIR/mongo/db/wire_version', '$BUILD_DIR/mongo/rpc/client_metadata', - '$BUILD_DIR/mongo/util/latch_analyzer' if get_option('use-diagnostic-latches') == 'on' else [], + '$BUILD_DIR/mongo/util/latch_analyzer' + if get_option('use-diagnostic-latches') == 'on' else [], '$BUILD_DIR/mongo/util/options_parser/options_parser', '$BUILD_DIR/mongo/util/version_impl', - ] + ], ) diff --git a/src/mongo/embedded/mongo_embedded/SConscript b/src/mongo/embedded/mongo_embedded/SConscript index 8f84ee065d5..39336394eba 100644 --- a/src/mongo/embedded/mongo_embedded/SConscript +++ b/src/mongo/embedded/mongo_embedded/SConscript @@ -19,18 +19,14 @@ env.AutoInstall( ) mongoEmbeddedEnv = env.Clone() -mongoEmbeddedEnv.AppendUnique( - CPPDEFINES=[ - 'MONGO_EMBEDDED_COMPILING', - ], -) +mongoEmbeddedEnv.AppendUnique(CPPDEFINES=[ + 'MONGO_EMBEDDED_COMPILING', +], ) if get_option('link-model') == 'static': - mongoEmbeddedEnv.AppendUnique( - CPPDEFINES=[ - 'MONGO_EMBEDDED_STATIC', - ], - ) + mongoEmbeddedEnv.AppendUnique(CPPDEFINES=[ + 'MONGO_EMBEDDED_STATIC', + ], ) elif get_option('link-model') == 'dynamic-sdk': # TODO(SERVER-59134): This fails to honor the libdeps-debug flag mongoEmbeddedEnv['LIBDEPS_SHLIBEMITTER'] = partial( @@ -39,11 +35,9 @@ elif get_option('link-model') == 'dynamic-sdk': visibility_map=libdeps.dependency_visibility_honored, ) -mongoEmbeddedEnv.AppendUnique( - SHLINKFLAGS=[ - '$MONGO_EXPORT_FILE_SHLINKFLAGS', - ], -) +mongoEmbeddedEnv.AppendUnique(SHLINKFLAGS=[ + '$MONGO_EXPORT_FILE_SHLINKFLAGS', +], ) if mongoEmbeddedEnv.TargetOSIs('darwin'): # The current version and compatibility are the *minor* ABI @@ -57,9 +51,7 @@ if mongoEmbeddedEnv.TargetOSIs('darwin'): SHLINKFLAGS=[ '-Wl,-current_version,1', '-Wl,-compatibility_version,1', - ], - ) - + ], ) mongoEmbeddedTargets = mongoEmbeddedEnv.Library( target='mongo_embedded', diff --git a/src/mongo/embedded/mongoc_embedded/SConscript b/src/mongo/embedded/mongoc_embedded/SConscript index 69b5d150b20..57cead4cc65 100644 --- a/src/mongo/embedded/mongoc_embedded/SConscript +++ b/src/mongo/embedded/mongoc_embedded/SConscript @@ -18,33 +18,29 @@ env.AutoInstall( AIB_ROLE='base', ) + def create_mongoc_env(env): mongocEnv = env.Clone() mongocEnv.AppendUnique(LIBS=['bson-1.0', 'mongoc-1.0']) return mongocEnv + mongocEmbeddedEnv = create_mongoc_env(env) -mongocEmbeddedEnv.AppendUnique( - CPPDEFINES=[ - 'MONGOC_EMBEDDED_COMPILING', - ], -) +mongocEmbeddedEnv.AppendUnique(CPPDEFINES=[ + 'MONGOC_EMBEDDED_COMPILING', +], ) if get_option('link-model') == 'static': - mongocEmbeddedEnv.AppendUnique( - CPPDEFINES=[ - 'MONGOC_EMBEDDED_STATIC', - ], - ) + mongocEmbeddedEnv.AppendUnique(CPPDEFINES=[ + 'MONGOC_EMBEDDED_STATIC', + ], ) # Please see the note in ../mongo_embedded/SConscript about how to # interpret and adjust the current and compatibility versinos. -mongocEmbeddedEnv.AppendUnique( - SHLINKFLAGS=[ - '$MONGO_EXPORT_FILE_SHLINKFLAGS', - ], -) +mongocEmbeddedEnv.AppendUnique(SHLINKFLAGS=[ + '$MONGO_EXPORT_FILE_SHLINKFLAGS', +], ) if mongocEmbeddedEnv.TargetOSIs('darwin'): # Please see the note in ../mongo_embedded/SConscript about how to @@ -53,8 +49,7 @@ if mongocEmbeddedEnv.TargetOSIs('darwin'): SHLINKFLAGS=[ '-Wl,-current_version,1', '-Wl,-compatibility_version,1', - ], - ) + ], ) mongocEmbeddedTargets = mongocEmbeddedEnv.Library( target='mongoc_embedded', @@ -72,7 +67,7 @@ env.AutoInstall( '$PREFIX_INCLUDEDIR/mongoc_embedded/v1/mongoc_embedded', source=['mongoc_embedded.h'], AIB_COMPONENT='embedded', - AIB_ROLE='dev' + AIB_ROLE='dev', ) yamlEnv = env.Clone() diff --git a/src/mongo/embedded/stitch_support/SConscript b/src/mongo/embedded/stitch_support/SConscript index 8ab94cb83c9..63e178ea475 100644 --- a/src/mongo/embedded/stitch_support/SConscript +++ b/src/mongo/embedded/stitch_support/SConscript @@ -9,18 +9,14 @@ Import("get_option") env = env.Clone() stitchSupportEnv = env.Clone() -stitchSupportEnv.AppendUnique( - CPPDEFINES=[ - 'STITCH_SUPPORT_COMPILING', - ], -) +stitchSupportEnv.AppendUnique(CPPDEFINES=[ + 'STITCH_SUPPORT_COMPILING', +], ) if get_option('link-model') == 'static': - stitchSupportEnv.AppendUnique( - CPPDEFINES=[ - 'STITCH_SUPPORT_STATIC', - ], - ) + stitchSupportEnv.AppendUnique(CPPDEFINES=[ + 'STITCH_SUPPORT_STATIC', + ], ) elif get_option('link-model') == 'dynamic-sdk': # TODO(SERVER-59134): This fails to honor the libdeps-debug flag stitchSupportEnv['LIBDEPS_SHLIBEMITTER'] = partial( @@ -31,11 +27,9 @@ elif get_option('link-model') == 'dynamic-sdk': # Please see the note in ../mongo_embedded/SConscript about how to # interpret and adjust the current and compatibility versions. -stitchSupportEnv.AppendUnique( - SHLINKFLAGS=[ - '$MONGO_EXPORT_FILE_SHLINKFLAGS', - ], -) +stitchSupportEnv.AppendUnique(SHLINKFLAGS=[ + '$MONGO_EXPORT_FILE_SHLINKFLAGS', +], ) stitchSupportTargets = stitchSupportEnv.Library( target='stitch_support', diff --git a/src/mongo/executor/SConscript b/src/mongo/executor/SConscript index f60bca56216..33c76ab6cb3 100644 --- a/src/mongo/executor/SConscript +++ b/src/mongo/executor/SConscript @@ -16,7 +16,7 @@ env.Library( LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/server_feature_flags', '$BUILD_DIR/mongo/idl/feature_flag', - ] + ], ) env.Library( @@ -25,7 +25,7 @@ env.Library( LIBDEPS=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/base/system_error', - ] + ], ) env.Library( @@ -38,7 +38,7 @@ env.Library( '$BUILD_DIR/mongo/db/api_parameters', '$BUILD_DIR/mongo/rpc/metadata', '$BUILD_DIR/mongo/util/net/network', - ] + ], ) env.Library( @@ -51,7 +51,7 @@ env.Library( '$BUILD_DIR/mongo/util/net/network', 'remote_command', 'task_executor_interface', - ] + ], ) env.Library( @@ -62,7 +62,7 @@ env.Library( LIBDEPS=[ '$BUILD_DIR/mongo/base', 'remote_command', - ] + ], ) env.Library( @@ -73,7 +73,7 @@ env.Library( LIBDEPS=[ '$BUILD_DIR/mongo/util/fail_point', 'task_executor_interface', - ] + ], ) env.Library( @@ -83,7 +83,7 @@ env.Library( ], LIBDEPS=[ 'task_executor_interface', - ] + ], ) env.Library( @@ -109,7 +109,7 @@ env.Library( env.Library( target='connection_pool_executor', source=[ - 'connection_pool.cpp', + 'connection_pool.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/base', @@ -132,7 +132,7 @@ env.Library( '$BUILD_DIR/mongo/db/query/command_request_response', 'network_interface_mock', 'task_executor_interface', - ] + ], ) env.Library( @@ -142,7 +142,7 @@ env.Library( ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/service_context', - ] + ], ) env.Library( @@ -172,13 +172,13 @@ env.Library( '$BUILD_DIR/mongo/transport/transport_layer_manager', 'connection_pool_executor', 'network_interface', - ] + ], ) env.Library( target='network_interface_fixture', source=[ - 'network_interface_integration_fixture.cpp' + 'network_interface_integration_fixture.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/executor/network_interface_factory', @@ -188,18 +188,15 @@ env.Library( '$BUILD_DIR/mongo/unittest/integration_test_main', '$BUILD_DIR/mongo/util/concurrency/thread_pool', '$BUILD_DIR/mongo/util/version_impl', - ] + ], ) env.Library( - target='network_interface_factory', - source=[ + target='network_interface_factory', source=[ 'network_interface_factory.cpp', - ], - LIBDEPS=[ + ], LIBDEPS=[ 'connection_pool_executor', - ], - LIBDEPS_PRIVATE=[ + ], LIBDEPS_PRIVATE=[ 'egress_tag_closer_manager', 'network_interface', 'network_interface_tl', @@ -209,14 +206,14 @@ env.Library( target='task_executor_test_fixture', source=[ 'task_executor_test_common.cpp', - 'task_executor_test_fixture.cpp' + 'task_executor_test_fixture.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/unittest/unittest', '$BUILD_DIR/mongo/util/clock_source_mock', 'network_interface_mock', 'task_executor_interface', - ] + ], ) env.Library( @@ -231,7 +228,7 @@ env.Library( ], LIBDEPS_PRIVATE=[ 'network_interface', - ] + ], ) env.Library( @@ -248,11 +245,11 @@ env.Library( target='thread_pool_task_executor_test_fixture', source=[ 'thread_pool_task_executor_test_fixture.cpp', - ], + ], LIBDEPS=[ 'task_executor_test_fixture', 'thread_pool_task_executor', - ] + ], ) env.Library( diff --git a/src/mongo/idl/SConscript b/src/mongo/idl/SConscript index da648b3cf4b..6861fd9821a 100644 --- a/src/mongo/idl/SConscript +++ b/src/mongo/idl/SConscript @@ -25,13 +25,13 @@ env.Library( source=[ 'command_generic_argument.cpp', 'generic_argument.idl', - 'idl_parser.cpp' + 'idl_parser.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/db/commands/server_status_core', '$BUILD_DIR/mongo/db/tenant_id', - ] + ], ) env.Library( @@ -72,7 +72,7 @@ env.Library( LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/dbdirectclient', '$BUILD_DIR/mongo/db/repl/replica_set_aware_service', - ] + ], ) env.Library( @@ -98,7 +98,7 @@ env.Library( LIBDEPS=[ '$BUILD_DIR/mongo/base', 'cluster_server_parameter', - ] + ], ) env.CppUnitTest( @@ -183,7 +183,6 @@ env.CppUnitTest( 'unittest.idl', 'unittest_import.idl', ], - LIBDEPS=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/db/auth/authprivilege', diff --git a/src/mongo/installer/SConscript b/src/mongo/installer/SConscript index 5bd89fe9d74..5bbf8db4c98 100644 --- a/src/mongo/installer/SConscript +++ b/src/mongo/installer/SConscript @@ -21,12 +21,12 @@ if env.TargetOSIs('windows'): redist_file = env['MSVS'].get('VCREDISTEXE', None) if not redist_file: - env.FatalError('Required CRT redistributable not found; cannot build distribution package') + env.FatalError('Required CRT redistributable not found; cannot build distribution package') env.AutoInstall( target='$PREFIX_BINDIR', source=[ - "${MSVS['VCREDISTEXE']}" + "${MSVS['VCREDISTEXE']}", ], AIB_COMPONENT="dist", AIB_ROLE="runtime", diff --git a/src/mongo/installer/compass/SConscript b/src/mongo/installer/compass/SConscript index 9a577142181..ecb6de43d0c 100644 --- a/src/mongo/installer/compass/SConscript +++ b/src/mongo/installer/compass/SConscript @@ -1,7 +1,7 @@ # -*- mode: python; -*- Import([ - "env" + "env", ]) env = env.Clone() diff --git a/src/mongo/installer/msi/SConscript b/src/mongo/installer/msi/SConscript index 9b8cdc4033f..9bc64115bde 100644 --- a/src/mongo/installer/msi/SConscript +++ b/src/mongo/installer/msi/SConscript @@ -35,14 +35,17 @@ env['WIXUIEXT'] = r'$WIXPATH\WixUIExtension.dll' env['WIXUTILEXT'] = r'$WIXPATH\WixUtilExtension.dll'
if not 'VCREDISTMERGEMODULEPATH' in env['MSVS']:
- print("SCons tool setup did not configure the path to the vcredist merge modules, disabling MSI installer")
+ print(
+ "SCons tool setup did not configure the path to the vcredist merge modules, disabling MSI installer"
+ )
Return()
-sourcesList = [ "BinaryFragment.wxs",
- "FeatureFragment.wxs",
- "LicensingFragment.wxs",
- "UIFragment.wxs",
- ]
+sourcesList = [
+ "BinaryFragment.wxs",
+ "FeatureFragment.wxs",
+ "LicensingFragment.wxs",
+ "UIFragment.wxs",
+]
# Need to do this in order to get scons to translate path separators into native format
buildDir = env.Dir("$BUILD_DIR").path
@@ -61,13 +64,13 @@ enterpriseToolBuildDir = buildDir + r'\mongo\db\modules\enterprise' msi_flavor = '2008R2Plus'
msi_platform = 'x64'
-if 'enterprise' in env['MONGO_MODULES']: # Enterprise
- msi_edition = 'Enterprise'
-else: # Community
- if get_option('ssl') == 'on':
- msi_edition = 'SSL'
- else:
- msi_edition = 'Standard'
+if 'enterprise' in env['MONGO_MODULES']: # Enterprise
+ msi_edition = 'Enterprise'
+else: # Community
+ if get_option('ssl') == 'on':
+ msi_edition = 'SSL'
+ else:
+ msi_edition = 'Standard'
full_version = env['MONGO_VERSION'].partition('-')[0]
@@ -94,7 +97,6 @@ objects = ["$BUILD_DIR/msi/" + file.replace(".wxs", ".wixobj") for file in sourc # GUID generation for us rather then build a database of GUIDs in our build system
# For major updates, we are going to create a new directory/productid/upgrade_code ie, 2.6 -> 3.0
-
# candle: compile .wxs files into .wixobjs
candle_targets = env.Command(
target=objects,
@@ -103,21 +105,16 @@ candle_targets = env.Command( '"$WIXCANDLE" -wx'
# cannot have anything other than x.x.x.x in version string.
# we should choose a fourth version number that reflects pre-ness.
- ' -dMongoDBMajorVersion=' + major_version +
- ' -dMongoDBVersion=' + full_version +
+ ' -dMongoDBMajorVersion=' + major_version + ' -dMongoDBVersion=' + full_version +
' -dLicenseSource=distsrc'
r' -dEnterpriseBase=' + enterprisebase + '\\'
- ' -dBinarySource=' + "\"$DESTDIR\\$PREFIX_BINDIR\"" +
- ' -dMergeModulesBasePath=' + "\"${MSVS['VCREDISTMERGEMODULEPATH']}\"" +
- ' -dMergeModuleFileCRT=' + env.GetMergeModuleNameForFeature('CRT') +
- ' -dEdition=' + msi_edition +
- ' -d"ProductId=*\"'
- ' -dUpgradeCode=' + upgrade_code +
- ' -dCustomActionDll=' + "\"$DESTDIR\\$PREFIX_BINDIR\\mongoca.dll\"" +
- ' -dConfiguration=Release'
+ ' -dBinarySource=' + "\"$DESTDIR\\$PREFIX_BINDIR\"" + ' -dMergeModulesBasePath=' +
+ "\"${MSVS['VCREDISTMERGEMODULEPATH']}\"" + ' -dMergeModuleFileCRT=' +
+ env.GetMergeModuleNameForFeature('CRT') + ' -dEdition=' + msi_edition + ' -d"ProductId=*\"'
+ ' -dUpgradeCode=' + upgrade_code + ' -dCustomActionDll=' +
+ "\"$DESTDIR\\$PREFIX_BINDIR\\mongoca.dll\"" + ' -dConfiguration=Release'
' -dOutDir=' + buildDir + r'\msi'
- ' -dPlatform=' + msi_platform +
- ' -dFlavor=' + msi_flavor +
+ ' -dPlatform=' + msi_platform + ' -dFlavor=' + msi_flavor +
r' -dProjectDir=buildscripts\packaging\msi\\'
' -dProjectName=MongoDB'
' -dTargetDir=' + buildDir + r'\msi'
@@ -125,13 +122,11 @@ candle_targets = env.Command( ' -dTargetFileName=${SERVER_ARCHIVE}'
r' -dSaslSource=c:\sasl\bin'
r' -dSnmpSource=c:\snmp\bin'
- r' -dSslSource=' + env['WINDOWS_OPENSSL_BIN'] +
- ' -out ' + buildDir + r'\msi\\'
- ' -arch ' + msi_platform +
- ' -ext "$WIXUIEXT"'
+ r' -dSslSource=' + env['WINDOWS_OPENSSL_BIN'] + ' -out ' + buildDir + r'\msi\\'
+ ' -arch ' + msi_platform + ' -ext "$WIXUIEXT"'
' -ext "$WIXUTILEXT"'
' $SOURCES'
- ]
+ ],
)
pre_msi = env.Command(
@@ -155,34 +150,34 @@ pre_msi = env.Command( # so this consistency check can be ignored.
# -- https://msdn.microsoft.com/en-us/library/windows/desktop/aa368954(v=vs.85).aspx
' -sice:ICE30'
-
' -ext "$WIXUIEXT"'
' -ext "$WIXUTILEXT"'
' ${SOURCES}'
- ]
+ ],
)
-env.Depends(pre_msi, [
- '#/buildscripts/packaging/msi/mongod.yaml',
+env.Depends(
+ pre_msi,
+ [
+ '#/buildscripts/packaging/msi/mongod.yaml',
- # This could potentially be a superset of what we actually
- # require to build the MSI, but it should never be a subset.
- env.Alias('install-dist'),
+ # This could potentially be a superset of what we actually
+ # require to build the MSI, but it should never be a subset.
+ env.Alias('install-dist'),
- # We also need the mongoca DLL.
- env.Alias('install-msi-util')
-])
+ # We also need the mongoca DLL.
+ env.Alias('install-msi-util')
+ ],
+)
env.NoCache(pre_msi)
msi = env.Command(
target='$BUILD_DIR/msi/${SERVER_DIST_BASENAME}.msi',
source=pre_msi,
- action=[
- r'$PYTHON buildscripts\msitrim.py ${SOURCES} ${TARGET}'
- ]
+ action=[r'$PYTHON buildscripts\msitrim.py ${SOURCES} ${TARGET}'],
)
env.AlwaysBuild(msi)
env.NoCache(msi)
-env.Alias( "msi" , msi )
+env.Alias("msi", msi)
diff --git a/src/mongo/installer/msi/ca/SConscript b/src/mongo/installer/msi/ca/SConscript index 2506143eb92..70fda4faef7 100644 --- a/src/mongo/installer/msi/ca/SConscript +++ b/src/mongo/installer/msi/ca/SConscript @@ -20,9 +20,8 @@ else: env.Append(LIBS=[ 'msi', - 'user32' - ] -) + 'user32', +]) ca = env.SharedLibrary( target='mongoca', diff --git a/src/mongo/logv2/SConscript b/src/mongo/logv2/SConscript index 05351e1a2fe..cde87eda686 100644 --- a/src/mongo/logv2/SConscript +++ b/src/mongo/logv2/SConscript @@ -15,7 +15,7 @@ env.CppUnitTest( '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/db/auth/security_token', '$BUILD_DIR/mongo/db/multitenancy_params', - ] + ], ) env.Benchmark( diff --git a/src/mongo/platform/SConscript b/src/mongo/platform/SConscript index 71a0a57772d..b2a8b54a67d 100644 --- a/src/mongo/platform/SConscript +++ b/src/mongo/platform/SConscript @@ -21,7 +21,7 @@ env.CppUnitTest( 'stack_locator_test.cpp', 'decimal128_test.cpp', 'decimal128_bson_test.cpp', - 'overflow_arithmetic_test.cpp' + 'overflow_arithmetic_test.cpp', ], ) @@ -30,8 +30,7 @@ env.Benchmark( source=[ 'endian_bm.cpp', ], - LIBDEPS=[ - ], + LIBDEPS=[], ) if not get_option("link-model") == "dynamic": @@ -52,7 +51,7 @@ env.Library( env.Library( target="visibility_test_lib1", source=[ - "visibility_test_lib1.cpp" + "visibility_test_lib1.cpp", ], LIBDEPS_NO_INHERIT=[ '$BUILD_DIR/third_party/shim_allocator', @@ -67,7 +66,7 @@ env.Library( env.Library( target="visibility_test_lib2", source=[ - "visibility_test_lib2.cpp" + "visibility_test_lib2.cpp", ], LIBDEPS_NO_INHERIT=[ '$BUILD_DIR/third_party/shim_allocator', diff --git a/src/mongo/resmoke/SConscript b/src/mongo/resmoke/SConscript index fb80ab1a713..f2d81a98a66 100644 --- a/src/mongo/resmoke/SConscript +++ b/src/mongo/resmoke/SConscript @@ -9,9 +9,9 @@ install_dir = env.Dir('$DESTDIR/$PREFIX_BINDIR').path.replace("\\", r"\\") resmoke_py = env.Substfile( target="resmoke.py", source='resmoke.py.in', - SUBST_DICT = { + SUBST_DICT={ '@install_dir@': install_dir, - } + }, ) resmoke_py_install = env.AutoInstall( '$PREFIX_BINDIR', diff --git a/src/mongo/rpc/SConscript b/src/mongo/rpc/SConscript index 385279f5c6c..a3de4fa709e 100644 --- a/src/mongo/rpc/SConscript +++ b/src/mongo/rpc/SConscript @@ -138,7 +138,7 @@ env.Library( env.Library( target=[ - 'metadata_impersonated_user' + 'metadata_impersonated_user', ], source=[ 'metadata/impersonated_user_metadata.cpp', @@ -154,7 +154,6 @@ env.Library( ], ) - env.Library( target='client_metadata', source=[ @@ -199,14 +198,14 @@ if wiredtiger: 'metadata', 'rewrite_state_change_errors', 'rpc', - ] + ], ) env.CppIntegrationTest( target='rpc_integration_test', source=[ 'op_msg_integration_test.cpp', - 'op_legacy_integration_test.cpp' + 'op_legacy_integration_test.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/client/clientdriver_network', diff --git a/src/mongo/s/SConscript b/src/mongo/s/SConscript index 2864810d025..ac21f54fe9c 100644 --- a/src/mongo/s/SConscript +++ b/src/mongo/s/SConscript @@ -140,11 +140,11 @@ env.Library( env.Library( target="load_balancer_feature_flag", source=[ - 'load_balancer_feature_flag.idl' + 'load_balancer_feature_flag.idl', ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/idl/feature_flag', - ] + ], ) env.Library( @@ -254,7 +254,7 @@ env.Library( source=[ 'sharding_test_fixture_common.cpp', 'catalog_cache_loader_mock.cpp', - 'catalog_cache_mock.cpp' + 'catalog_cache_mock.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/client/remote_command_targeter_mock', @@ -351,12 +351,12 @@ env.Benchmark( env.Library( target='committed_optime_metadata_hook', source=[ - 'committed_optime_metadata_hook.cpp' + 'committed_optime_metadata_hook.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/rpc/metadata', 'coreshard', - ] + ], ) env.Library( @@ -378,7 +378,7 @@ env.Library( '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/bson/util/bson_extract', '$BUILD_DIR/mongo/rpc/metadata', - ] + ], ) env.Library( @@ -403,7 +403,7 @@ env.Library( ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/idl/server_parameter', - ] + ], ) env.Library( @@ -483,7 +483,8 @@ env.Library( '$BUILD_DIR/mongo/transport/transport_layer_manager', '$BUILD_DIR/mongo/util/clock_sources', '$BUILD_DIR/mongo/util/fail_point', - '$BUILD_DIR/mongo/util/latch_analyzer' if get_option('use-diagnostic-latches') == 'on' else [], + '$BUILD_DIR/mongo/util/latch_analyzer' + if get_option('use-diagnostic-latches') == 'on' else [], '$BUILD_DIR/mongo/util/net/http_client_impl', '$BUILD_DIR/mongo/util/net/ssl_options_server' if get_option('ssl') == 'on' else '', '$BUILD_DIR/mongo/util/ntservice', @@ -540,7 +541,8 @@ env.Library( '$BUILD_DIR/mongo/db/startup_warnings_common', '$BUILD_DIR/mongo/transport/service_entry_point', '$BUILD_DIR/mongo/transport/transport_layer_manager', - '$BUILD_DIR/mongo/util/latch_analyzer' if get_option('use-diagnostic-latches') == 'on' else [], + '$BUILD_DIR/mongo/util/latch_analyzer' + if get_option('use-diagnostic-latches') == 'on' else [], '$BUILD_DIR/mongo/util/signal_handlers', 'client/sharding_client', 'commands/cluster_commands', @@ -569,7 +571,8 @@ if env.TargetOSIs('windows'): ('@mongo_version_patch@', version_parts[2]), ('@mongo_version_extra@', version_parts[3]), ('@mongo_version_extra_str@', version_extra), - ]) + ], + ) env.Alias('generated-sources', generatedServerManifest) env.Depends("mongos.res", generatedServerManifest) diff --git a/src/mongo/s/catalog/SConscript b/src/mongo/s/catalog/SConscript index 964be746811..6b6d5a43151 100644 --- a/src/mongo/s/catalog/SConscript +++ b/src/mongo/s/catalog/SConscript @@ -29,8 +29,8 @@ env.Library( 'sharding_catalog_client', ], LIBDEPS_PRIVATE=[ - '$BUILD_DIR/mongo/db/logical_session_id_helpers' - ] + '$BUILD_DIR/mongo/db/logical_session_id_helpers', + ], ) env.Library( @@ -40,6 +40,6 @@ env.Library( ], LIBDEPS=[ '$BUILD_DIR/mongo/s/client/shard_interface', - 'sharding_catalog_client' - ] + 'sharding_catalog_client', + ], ) diff --git a/src/mongo/s/commands/SConscript b/src/mongo/s/commands/SConscript index ad4c3e46ae3..543fa0a59b8 100644 --- a/src/mongo/s/commands/SConscript +++ b/src/mongo/s/commands/SConscript @@ -17,7 +17,7 @@ env.Library( '$BUILD_DIR/mongo/db/commands', '$BUILD_DIR/mongo/s/grid', '$BUILD_DIR/mongo/s/startup_initialization', - ] + ], ) # These commands are linked in mongos and mongoqd @@ -154,7 +154,7 @@ env.Library( '$BUILD_DIR/mongo/transport/message_compressor', '$BUILD_DIR/mongo/transport/transport_layer_common', 'cluster_commands_common', - ] + ], ) env.Library( @@ -185,7 +185,7 @@ env.Library( '$BUILD_DIR/mongo/s/sharding_router_api', '$BUILD_DIR/mongo/transport/message_compressor', '$BUILD_DIR/mongo/transport/transport_layer_common', - ] + ], ) # These commands are linked in MongoS only @@ -229,7 +229,7 @@ env.Library( '$BUILD_DIR/mongo/transport/transport_layer_common', 'cluster_commands', 'cluster_commands_common', - ] + ], ) env.CppUnitTest( diff --git a/src/mongo/s/query/SConscript b/src/mongo/s/query/SConscript index f6f1ac53b05..ab67239ff80 100644 --- a/src/mongo/s/query/SConscript +++ b/src/mongo/s/query/SConscript @@ -44,7 +44,7 @@ env.Library( ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/timeseries/timeseries_options', - ] + ], ) env.Library( @@ -92,13 +92,13 @@ env.Library( ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/catalog/collection_uuid_mismatch_info', - ] + ], ) env.Library( target="store_possible_cursor", source=[ - "store_possible_cursor.cpp" + "store_possible_cursor.cpp", ], LIBDEPS=[ "$BUILD_DIR/mongo/base", diff --git a/src/mongo/scripting/SConscript b/src/mongo/scripting/SConscript index 5be96f735d5..9ff0309cc22 100644 --- a/src/mongo/scripting/SConscript +++ b/src/mongo/scripting/SConscript @@ -48,7 +48,7 @@ env.Library( ], LBDEPS_PRIVATE=[ 'bson_template_evaluator', - ] + ], ) if jsEngine: @@ -59,16 +59,13 @@ if jsEngine: # TODO(SERVER-59992): Remove -Wno-class-memacces where possible. '-Wno-unknown-warning-option', '-Wno-class-memaccess', - ], - ) + ], ) scriptingEnv.InjectMozJS() scriptingEnv.JSHeader( target='mozjs/mongohelpers_js.cpp', - source=[ - 'mozjs/mongohelpers.js' - ] + source=['mozjs/mongohelpers.js'], ) env.Alias('generated-sources', 'mozjs/mongohelpers_js.cpp') @@ -138,7 +135,7 @@ else: env.Library( target='scripting', source=[ - 'scripting_none.cpp' + 'scripting_none.cpp', ], LIBDEPS=[ 'scripting_none', diff --git a/src/mongo/shell/SConscript b/src/mongo/shell/SConscript index 28d8bc07156..6607afc5792 100644 --- a/src/mongo/shell/SConscript +++ b/src/mongo/shell/SConscript @@ -34,7 +34,8 @@ generateJSErrorCodes = env.Command( '$BUILD_DIR/mongo/base/error_codes.yml', 'error_codes.tpl.js', ], - action=['$PYTHON ${SOURCES[0]} ${SOURCES[1]} ${SOURCES[2]} ${TARGETS[0]}']) + action=['$PYTHON ${SOURCES[0]} ${SOURCES[1]} ${SOURCES[2]} ${TARGETS[0]}'], +) env.Alias('generated-sources', generateJSErrorCodes) # Files added here need to be added in scripting/engine.cpp and buildscripts/vcxproj.header as well. @@ -57,7 +58,7 @@ js_header = env.JSHeader( "utils_auth.js", "utils.js", "utils_sh.js", - ] + ], ) env.Alias('generated-sources', js_header) @@ -139,7 +140,7 @@ env.Library( ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/auth/security_token', - ] + ], ) if get_option('ssl') == 'on': @@ -191,8 +192,7 @@ if get_option('ssl') == 'on': # TODO(SERVER-59992): Remove -Wno-class-memacces where possible. '-Wno-unknown-warning-option', '-Wno-class-memaccess', - ], - ) + ], ) scriptingEnv.InjectMozJS() @@ -228,7 +228,7 @@ env.Library( target="linenoise", source=[ "linenoise.cpp", - "mk_wcwidth.cpp" + "mk_wcwidth.cpp", ], LIBDEPS=[ '$BUILD_DIR/mongo/base', @@ -288,7 +288,6 @@ if not has_option('noshell') and jsEngine: LIBDEPS=[ # NOTE: This list must remain empty. Please only add to LIBDEPS_PRIVATE ], - ) env.Library( @@ -322,14 +321,15 @@ if not has_option('noshell') and jsEngine: shellEnv.Append(LIBS=["winmm"]) generatedMongoManifest = shellEnv.Substfile( - 'mongo.manifest.in', - SUBST_DICT=[ - ('@mongo_version_major@', version_parts[0]), - ('@mongo_version_minor@', version_parts[1]), - ('@mongo_version_patch@', version_parts[2]), - ('@mongo_version_extra@', version_parts[3]), - ('@mongo_version_extra_str@', version_extra), - ]) + 'mongo.manifest.in', + SUBST_DICT=[ + ('@mongo_version_major@', version_parts[0]), + ('@mongo_version_minor@', version_parts[1]), + ('@mongo_version_patch@', version_parts[2]), + ('@mongo_version_extra@', version_parts[3]), + ('@mongo_version_extra_str@', version_extra), + ], + ) shellEnv.Alias('generated-sources', generatedMongoManifest) shellEnv.Depends("mongo.res", generatedMongoManifest) @@ -358,12 +358,10 @@ if not has_option('noshell') and jsEngine: ], ) - env.CppUnitTest( target='shell_test', source=[ - 'kms_test.cpp' if get_option('ssl') == 'on' else [], - 'shell_options_test.cpp', + 'kms_test.cpp' if get_option('ssl') == 'on' else [], 'shell_options_test.cpp', 'shell_utils_test.cpp' ], LIBDEPS=[ diff --git a/src/mongo/stdx/SConscript b/src/mongo/stdx/SConscript index fc70228475e..ece7efba3f5 100644 --- a/src/mongo/stdx/SConscript +++ b/src/mongo/stdx/SConscript @@ -29,7 +29,7 @@ env.Library( env.CppUnitTest( target='stdx_test', source=[ - 'unordered_map_test.cpp' + 'unordered_map_test.cpp', ], LIBDEPS=[ '$BUILD_DIR/third_party/shim_abseil', diff --git a/src/mongo/tools/SConscript b/src/mongo/tools/SConscript index af952f2df16..78882321775 100644 --- a/src/mongo/tools/SConscript +++ b/src/mongo/tools/SConscript @@ -15,7 +15,7 @@ mongobridge = env.Program( "bridge_commands.cpp", "mongobridge_options.cpp", "mongobridge_options.idl", - "mongobridge_options_init.cpp" + "mongobridge_options_init.cpp", ], LIBDEPS=[ '$BUILD_DIR/mongo/db/dbmessage', diff --git a/src/mongo/transport/SConscript b/src/mongo/transport/SConscript index 8043daa2ecd..a7433a979cd 100644 --- a/src/mongo/transport/SConscript +++ b/src/mongo/transport/SConscript @@ -87,7 +87,7 @@ env.Library( ], LIBDEPS_PRIVATE=[ 'transport_layer', - ] + ], ) tlEnv.Library( @@ -157,7 +157,7 @@ zlibEnv.Library( '$BUILD_DIR/third_party/shim_snappy', '$BUILD_DIR/third_party/shim_zlib', '$BUILD_DIR/third_party/shim_zstd', - ] + ], ) env.Library( @@ -225,8 +225,7 @@ tlEnvTest.Append( # upgrade per SERVER-54569. CCFLAGS=[] if env.TargetOSIs('windows') else [ '-Wno-nonnull', - ], -) + ], ) tlEnvTest.CppIntegrationTest( target='transport_integration_test', diff --git a/src/mongo/unittest/SConscript b/src/mongo/unittest/SConscript index b045b3f7429..30b4d352ac6 100644 --- a/src/mongo/unittest/SConscript +++ b/src/mongo/unittest/SConscript @@ -26,9 +26,9 @@ utEnv.Library( '$BUILD_DIR/mongo/db/server_options_core', '$BUILD_DIR/mongo/util/options_parser/options_parser', '$BUILD_DIR/third_party/shim_pcrecpp', - '$BUILD_DIR/third_party/shim_yaml' + '$BUILD_DIR/third_party/shim_yaml', ], - AIB_COMPONENT='unittests' + AIB_COMPONENT='unittests', ) env.Library( @@ -45,7 +45,7 @@ env.Library( '$BUILD_DIR/mongo/db/wire_version', '$BUILD_DIR/mongo/util/options_parser/options_parser', ], - AIB_COMPONENT='unittests' + AIB_COMPONENT='unittests', ) env.Library( @@ -70,7 +70,7 @@ env.Library( '$BUILD_DIR/mongo/util/options_parser/options_parser_init', '$BUILD_DIR/mongo/util/testing_options', ], - AIB_COMPONENT='integration-tests' + AIB_COMPONENT='integration-tests', ) bmEnv = env.Clone() @@ -78,7 +78,7 @@ bmEnv.InjectThirdParty(libraries=['benchmark']) bmEnv.Library( target='benchmark_main', source=[ - 'benchmark_main.cpp' + 'benchmark_main.cpp', ], LIBDEPS=[ # benchmark_main must not be made to depend on additional libraries. @@ -87,7 +87,7 @@ bmEnv.Library( '$BUILD_DIR/mongo/base', '$BUILD_DIR/third_party/shim_benchmark', ], - AIB_COMPONENT='benchmarks' + AIB_COMPONENT='benchmarks', ) env.Library( @@ -98,7 +98,7 @@ env.Library( LIBDEPS=[ '$BUILD_DIR/mongo/executor/task_executor_interface', ], - AIB_COMPONENT='benchmarks' + AIB_COMPONENT='benchmarks', ) env.CppUnitTest( @@ -116,7 +116,7 @@ env.CppUnitTest( env.Benchmark( target='system_resource_canary_bm', source=[ - 'system_resource_canary_bm.cpp' + 'system_resource_canary_bm.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/util/processinfo', diff --git a/src/mongo/util/SConscript b/src/mongo/util/SConscript index 21635d44a58..69e4cf54149 100644 --- a/src/mongo/util/SConscript +++ b/src/mongo/util/SConscript @@ -21,19 +21,23 @@ js_engine_ver = get_option("js-engine") if get_option("server-js") == "on" else module_list = ',\n'.join(['"{0}"_sd'.format(x) for x in env['MONGO_MODULES']]) + # Render the MONGO_BUILDINFO_ENVIRONMENT_DATA dict into an initializer for a # `std::vector<VersionInfoInterface::BuildInfoField>`. def fmtBuildInfo(data): def fmtBool(val): return "true" if val else "false" + def fmtStr(val): return 'R"({0})"_sd'.format(val.replace("\\", r"\\")) + def fmtObj(obj): - return '{{{}, {}, {}, {}}}'.format(fmtStr(obj['key']), - fmtStr(env.subst(obj['value'])), - fmtBool(obj['inBuildInfo']), - fmtBool(obj['inVersion'])) - return ',\n'.join([fmtObj(obj) for _,obj in data.items()]) + return '{{{}, {}, {}, {}}}'.format( + fmtStr(obj['key']), fmtStr(env.subst(obj['value'])), fmtBool(obj['inBuildInfo']), + fmtBool(obj['inVersion'])) + + return ',\n'.join([fmtObj(obj) for _, obj in data.items()]) + buildInfoInitializer = fmtBuildInfo(env['MONGO_BUILDINFO_ENVIRONMENT_DATA']) @@ -51,7 +55,8 @@ generatedVersionFile = env.Substfile( ('@buildinfo_allocator@', env['MONGO_ALLOCATOR']), ('@buildinfo_modules@', module_list), ('@buildinfo_environment_data@', buildInfoInitializer), - ]) + ], +) env.Alias('generated-sources', generatedVersionFile) if env.TargetOSIs('windows'): @@ -64,7 +69,8 @@ if env.TargetOSIs('windows'): ('@mongo_version_minor@', version_parts[1]), ('@mongo_version_patch@', version_parts[2]), ('@mongo_git_hash@', env['MONGO_GIT_HASH']), - ]) + ], + ) env.Alias('generated-sources', generatedResourceConstantFile) # Shim library for boost to depend on @@ -101,22 +107,22 @@ env.Library( ], LIBDEPS=[ '$BUILD_DIR/mongo/base', - ] + ], ) env.Library( target='intrusive_counter', source=[ 'intrusive_counter.cpp', - ], + ], LIBDEPS=[ '$BUILD_DIR/mongo/base', - ] + ], ) env.Library( target='log_and_backoff', - source= [ + source=[ 'log_and_backoff.cpp', ], LIBDEPS=[ @@ -126,7 +132,7 @@ env.Library( env.Library( target='regex_util', - source= [ + source=[ 'regex_util.cpp', ], LIBDEPS=[ @@ -166,7 +172,7 @@ env.Library( env.Library( target='clock_source_mock', source=[ - 'clock_source_mock.cpp' + 'clock_source_mock.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/base', @@ -287,7 +293,7 @@ env.Library( LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/db/service_context', - ] + ], ) env.Library( @@ -297,7 +303,7 @@ env.Library( ], LIBDEPS=[ '$BUILD_DIR/mongo/base', - ] + ], ) env.CppUnitTest( @@ -311,7 +317,6 @@ env.CppUnitTest( ], ) - env.CppUnitTest( target='thread_safety_context_test', source=[ @@ -332,12 +337,10 @@ if env['MONGO_ALLOCATOR'] in ['tcmalloc', 'tcmalloc-experimental']: # If our changes to tcmalloc are ever upstreamed, this should become set based on a top # level configure check, though its effects should still be scoped just to these files. - tcmspEnv.Append( - CPPDEFINES=[ - 'MONGO_HAVE_GPERFTOOLS_GET_THREAD_CACHE_SIZE', - 'MONGO_HAVE_GPERFTOOLS_SIZE_CLASS_STATS' - ] - ) + tcmspEnv.Append(CPPDEFINES=[ + 'MONGO_HAVE_GPERFTOOLS_GET_THREAD_CACHE_SIZE', + 'MONGO_HAVE_GPERFTOOLS_SIZE_CLASS_STATS', + ]) if not use_system_version_of_library('valgrind'): # Include valgrind since tcmalloc disables itself while running under valgrind @@ -351,8 +354,7 @@ if env['MONGO_ALLOCATOR'] in ['tcmalloc', 'tcmalloc-experimental']: 'tcmalloc_parameters.idl', 'heap_profiler.cpp', ], - LIBDEPS=[ - ], + LIBDEPS=[], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/commands/server_status', '$BUILD_DIR/mongo/idl/server_parameter', @@ -401,7 +403,7 @@ env.Library( if get_option('use-diagnostic-latches') == 'on': env.Library( target='diagnostic_info', - source= [ + source=[ 'diagnostic_info.cpp', ], LIBDEPS=[ @@ -412,7 +414,7 @@ if get_option('use-diagnostic-latches') == 'on': env.Library( target='latch_analyzer', - source= [ + source=[ 'latch_analyzer.cpp', ], LIBDEPS=[ @@ -442,7 +444,7 @@ env.Library( ], LIBDEPS=[ '$BUILD_DIR/mongo/base', - 'net/network', # this is for using listener to check elapsed time + 'net/network', # this is for using listener to check elapsed time ], ) @@ -511,7 +513,7 @@ env.Library( ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/idl/server_parameter', - ] + ], ) env.Library( @@ -540,8 +542,7 @@ env.Benchmark( source=[ 'decimal_counter_bm.cpp', ], - LIBDEPS=[ - ], + LIBDEPS=[], ) env.Benchmark( @@ -549,8 +550,7 @@ env.Benchmark( source=[ 'itoa_bm.cpp', ], - LIBDEPS=[ - ], + LIBDEPS=[], ) env.Benchmark( @@ -558,8 +558,7 @@ env.Benchmark( source=[ 'future_bm.cpp', ], - LIBDEPS=[ - ], + LIBDEPS=[], ) env.Library( @@ -568,15 +567,14 @@ env.Library( 'future_util.cpp', ], LIBDEPS=[ - '$BUILD_DIR/mongo/executor/task_executor_interface' + '$BUILD_DIR/mongo/executor/task_executor_interface', ], ) env.Benchmark( target='hash_table_bm', source='hash_table_bm.cpp', - LIBDEPS=[ - ], + LIBDEPS=[], ) if env.TargetOSIs('linux'): @@ -612,8 +610,8 @@ if not use_system_version_of_library("icu"): source=[ "generate_icu_init_cpp.py", ("$BUILD_DIR/third_party/icu4c-57.1/source/mongo_sources/icudt57l.dat" - if endian == "little" - else "$BUILD_DIR/third_party/icu4c-57.1/source/mongo_sources/icudt57b.dat"), + if endian == "little" else + "$BUILD_DIR/third_party/icu4c-57.1/source/mongo_sources/icudt57b.dat"), ], action="$PYTHON ${SOURCES[0]} -o $TARGET -i ${SOURCES[1]}", ) @@ -633,8 +631,7 @@ if not use_system_version_of_library("icu"): ("U_DISABLE_RENAMING", 1), ("U_STATIC_IMPLEMENTATION", 1), ("U_USING_ICU_NAMESPACE", 0), - ], - ) + ], ) # When using ICU from third_party, icu_init.cpp will load a subset of # ICU's data files using udata_setCommonData() in an initializer. @@ -769,7 +766,7 @@ if env.TargetOSIs('windows'): ], LIBS=[ 'shell32', - env['LIBS'] + env['LIBS'], ], ) @@ -781,11 +778,9 @@ env.Benchmark( stacktraceEnv = env.Clone() if use_libunwind: stacktraceEnv.InjectThirdParty(libraries=['unwind']) - stacktraceEnv.AppendUnique( - LIBDEPS=[ - '$BUILD_DIR/third_party/shim_unwind', - ], - ) + stacktraceEnv.AppendUnique(LIBDEPS=[ + '$BUILD_DIR/third_party/shim_unwind', + ], ) stacktraceEnv.CppUnitTest( target=[ @@ -851,4 +846,3 @@ env.Benchmark( 'processinfo', ], ) - diff --git a/src/mongo/util/cmdline_utils/SConscript b/src/mongo/util/cmdline_utils/SConscript index 1fbe0abb7e7..1cf262ac6c6 100644 --- a/src/mongo/util/cmdline_utils/SConscript +++ b/src/mongo/util/cmdline_utils/SConscript @@ -12,5 +12,5 @@ env.Library( LIBDEPS=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/util/options_parser/options_parser', - ]) - + ], +) diff --git a/src/mongo/util/concurrency/SConscript b/src/mongo/util/concurrency/SConscript index 7ac61ec0025..7e370ad903b 100644 --- a/src/mongo/util/concurrency/SConscript +++ b/src/mongo/util/concurrency/SConscript @@ -16,22 +16,21 @@ env.Library( env.Library( target='thread_pool_test_fixture', - source=[ - 'thread_pool_test_common.cpp', - 'thread_pool_test_fixture.cpp' - ], + source=['thread_pool_test_common.cpp', 'thread_pool_test_fixture.cpp'], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/unittest/unittest', - ] + ], ) -env.Library('ticketholder', - ['ticketholder.cpp'], - LIBDEPS=[ - '$BUILD_DIR/mongo/base', - '$BUILD_DIR/mongo/db/service_context', - '$BUILD_DIR/third_party/shim_boost', - ]) +env.Library( + 'ticketholder', + ['ticketholder.cpp'], + LIBDEPS=[ + '$BUILD_DIR/mongo/base', + '$BUILD_DIR/mongo/db/service_context', + '$BUILD_DIR/third_party/shim_boost', + ], +) env.Library( target='spin_lock', @@ -40,7 +39,7 @@ env.Library( ], LIBDEPS=[ '$BUILD_DIR/mongo/base', - ] + ], ) env.CppUnitTest( @@ -57,7 +56,7 @@ env.CppUnitTest( 'thread_pool', 'thread_pool_test_fixture', 'ticketholder', - ] + ], ) env.Benchmark( @@ -69,4 +68,3 @@ env.Benchmark( 'ticketholder', ], ) - diff --git a/src/mongo/util/net/SConscript b/src/mongo/util/net/SConscript index 9aec6ba3150..a8349820084 100644 --- a/src/mongo/util/net/SConscript +++ b/src/mongo/util/net/SConscript @@ -39,7 +39,7 @@ env.Library( LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/server_options_core', '$BUILD_DIR/mongo/util/options_parser/options_parser', - ] + ], ) env.Library( @@ -54,7 +54,7 @@ env.Library( ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/util/options_parser/options_parser', - ] + ], ) env.Library( @@ -72,7 +72,7 @@ env.Library( '$BUILD_DIR/mongo/db/auth/cluster_auth_mode', '$BUILD_DIR/mongo/db/server_options_core', '$BUILD_DIR/mongo/util/options_parser/options_parser', - ] + ], ) env.Library( @@ -85,7 +85,7 @@ env.Library( ], LIBDEPS_PRIVATE=[ 'ssl_options', - ] + ], ) if not get_option('ssl') == 'off': @@ -99,10 +99,8 @@ if not get_option('ssl') == 'off': '$BUILD_DIR/mongo/base', 'ssl_options', ], - LIBDEPS_PRIVATE=[ - '$BUILD_DIR/mongo/crypto/symmetric_crypto' - ] - ); + LIBDEPS_PRIVATE=['$BUILD_DIR/mongo/crypto/symmetric_crypto'], + ) env.Library( target='ssl_manager', @@ -193,7 +191,6 @@ env.Library( ], ) - if http_client == "off": env.Library( target='http_client_impl', @@ -287,5 +284,4 @@ if get_option('ssl') == 'on': '$BUILD_DIR/mongo/util/concurrency/thread_pool', '$BUILD_DIR/mongo/util/version_impl', ], -) - + ) diff --git a/src/mongo/util/options_parser/SConscript b/src/mongo/util/options_parser/SConscript index f8c7c2c0046..1290fdc521a 100644 --- a/src/mongo/util/options_parser/SConscript +++ b/src/mongo/util/options_parser/SConscript @@ -35,8 +35,11 @@ optsEnv.Library( # library because some code that is shared between many different binaries needs to link against the # options_parser library, but not all these binaries need to actually run the option parsing. # Linking against this library will cause the option parsing initializer to actually be run. -env.Library('options_parser_init', ['options_parser_init.cpp'], - LIBDEPS=['options_parser']) +env.Library( + 'options_parser_init', + ['options_parser_init.cpp'], + LIBDEPS=['options_parser'], +) env.CppUnitTest( target='options_parser_test', diff --git a/src/mongo/watchdog/SConscript b/src/mongo/watchdog/SConscript index 102c548c689..f26af597f28 100644 --- a/src/mongo/watchdog/SConscript +++ b/src/mongo/watchdog/SConscript @@ -11,7 +11,7 @@ env.Library( '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/db/service_context', '$BUILD_DIR/mongo/db/storage/storage_options', - ] + ], ) env.Library( diff --git a/src/third_party/IntelRDFPMathLib20U1/SConscript b/src/third_party/IntelRDFPMathLib20U1/SConscript index 8e55a1fe620..6cf292b64f6 100644 --- a/src/third_party/IntelRDFPMathLib20U1/SConscript +++ b/src/third_party/IntelRDFPMathLib20U1/SConscript @@ -262,12 +262,14 @@ cpp_defines = { libs = [] + def removeIfPresent(lst, item): try: lst.remove(item) except ValueError: pass + def float53_object(target, source, extra_defines=None): source = "LIBRARY/float128/" + source + ".c" obj_env = env.Clone() @@ -280,13 +282,13 @@ def float53_object(target, source, extra_defines=None): obj_env.Append(CCFLAGS='-w') return obj_env.LibraryObject(target, source) + # Set OS Defines if env.TargetOSIs('darwin'): cpp_defines['LINUX'] = '1' cpp_defines['mach'] = '1' extra_objects = [ - float53_object('dpml_log1p_t', 'dpml_log', - [('LOG1P', '1'), ('efi2', '1'), ('EFI2', '1')]) + float53_object('dpml_log1p_t', 'dpml_log', [('LOG1P', '1'), ('efi2', '1'), ('EFI2', '1')]) ] files += extra_objects @@ -341,15 +343,14 @@ if env.TargetOSIs('windows'): # C4477: incorrect scanf format string env.Append(CCFLAGS=['/wd4477']) - if env.ToolchainIs('msvc'): removeIfPresent(env['CCFLAGS'], '/W3') else: env.Append(CCFLAGS='-w') - libenv = env.Clone() + # On windows and macos we don't have this problem, but on other # platforms we do, where the system ligbcc may duplicate symbols that # exist in the intel library. We use a version script to force our @@ -367,12 +368,14 @@ def export_file_generator(target, source, env, for_signature): if env.TargetOSIs('posix'): return env.File(env.subst("${TARGET.base}.version_script", target=target)) + def export_flag_generator(target, source, env, for_signature): if env.TargetOSIs('darwin'): return "-Wl,-exported_symbols_list," if env.TargetOSIs('posix'): return "-Wl,--version-script," + if env.TargetOSIs('darwin', 'posix'): libenv.AppendUnique( EXPORT_FLAG_GEN=export_flag_generator, @@ -388,11 +391,14 @@ inteldecimal_library = libenv.Library( LIBS=libenv['LIBS'] + libs, LIBDEPS_TAGS=[ 'init-no-global-side-effects', - ] + ], ) if 'EXPORT_FILE_GEN' in libenv: - libenv.Depends(inteldecimal_library, libenv.subst('$EXPORT_FILE_GEN', target=inteldecimal_library)) + libenv.Depends( + inteldecimal_library, + libenv.subst('$EXPORT_FILE_GEN', target=inteldecimal_library), + ) if env["BUILDERS"].get("Ninja", None) is not None: Return() @@ -437,9 +443,9 @@ readtest_input = env.AutoInstall( env.Depends(readtest_input, readtest) readtest_dict = { - '@readtest_python_interpreter@' : sys.executable.replace('\\', r'\\'), - '@readtest_program@' : readtest[0].name, - '@readtest_input@' : readtest_input[0].name, + '@readtest_python_interpreter@': sys.executable.replace('\\', r'\\'), + '@readtest_program@': readtest[0].name, + '@readtest_input@': readtest_input[0].name, } readtest_wrapper = env.Substfile( diff --git a/src/third_party/SConscript b/src/third_party/SConscript index 8a5b21f1c0a..07dee011853 100644 --- a/src/third_party/SConscript +++ b/src/third_party/SConscript @@ -22,46 +22,32 @@ tomcryptSuffix = '-1.18.2' variantSuffix = '-1.4.0' thirdPartyEnvironmentModifications = { - 'abseil-cpp' : { - 'CPPPATH' : ['#/src/third_party/abseil-cpp-master/abseil-cpp'], - }, - 'fmt' : { - 'CPPPATH' : ['#src/third_party/fmt/dist/include'], - }, - 's2' : { - 'CPPPATH' : ['#src/third_party/s2'], - }, - 'safeint' : { - 'CPPPATH' : ['#src/third_party/SafeInt'], + 'abseil-cpp': {'CPPPATH': ['#/src/third_party/abseil-cpp-master/abseil-cpp'], }, + 'fmt': {'CPPPATH': ['#src/third_party/fmt/dist/include'], }, + 's2': {'CPPPATH': ['#src/third_party/s2'], }, + 'safeint': { + 'CPPPATH': ['#src/third_party/SafeInt'], # SAFEINT_USE_INTRINSICS=0 for overflow-safe constexpr multiply. See comment in SafeInt.hpp. - 'CPPDEFINES' : [('SAFEINT_USE_INTRINSICS', 0)], - }, - 'timelib' : { - 'CPPPATH' : ['#/src/third_party/timelib' + timelibSuffix], - }, - 'unwind' : { - }, - 'variant' : { - 'CPPPATH' : ['#src/third_party/variant' + variantSuffix + '/include'], - }, + 'CPPDEFINES': [('SAFEINT_USE_INTRINSICS', 0)], + }, + 'timelib': {'CPPPATH': ['#/src/third_party/timelib' + timelibSuffix], }, + 'unwind': {}, + 'variant': {'CPPPATH': ['#src/third_party/variant' + variantSuffix + '/include'], }, } + def injectMozJS(thisEnv): thisEnv.InjectThirdParty(libraries=['mozjs']) if thisEnv.TargetOSIs('windows'): - thisEnv.Append( - CPPDEFINES=[ - '_SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING', - ] - ) + thisEnv.Append(CPPDEFINES=[ + '_SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING', + ], ) else: - thisEnv.Append( - CXXFLAGS=[ - '-Wno-non-virtual-dtor', - '-Wno-invalid-offsetof', - ], - ) + thisEnv.Append(CXXFLAGS=[ + '-Wno-non-virtual-dtor', + '-Wno-invalid-offsetof', + ], ) thisEnv.Prepend(CPPDEFINES=[ 'JS_USE_CUSTOM_ALLOCATOR', @@ -74,8 +60,8 @@ def injectMozJS(thisEnv): 'JS_DEBUG', ]) -env.AddMethod(injectMozJS, 'InjectMozJS') +env.AddMethod(injectMozJS, 'InjectMozJS') if not use_system_version_of_library('tcmalloc'): # GPerftools does this slightly differently than the others. @@ -83,17 +69,16 @@ if not use_system_version_of_library('tcmalloc'): if not use_system_version_of_library('pcre'): thirdPartyEnvironmentModifications['pcre'] = { - 'CPPPATH' : ['#/src/third_party/pcre' + pcreSuffix], + 'CPPPATH': ['#/src/third_party/pcre' + pcreSuffix], } if not use_system_version_of_library('pcre2'): thirdPartyEnvironmentModifications['pcre2'] = { - 'CPPPATH' : ['#/src/third_party/pcre2'], + 'CPPPATH': ['#/src/third_party/pcre2'], } if not use_system_version_of_library('boost'): - # On at least Apple clang, proto throws this error. # # See https://github.com/boostorg/proto/issues/30. @@ -106,38 +91,38 @@ if not use_system_version_of_library('boost'): return '-Wno-error=unknown-warning-option' thirdPartyEnvironmentModifications['boost'] = { - 'CPPPATH' : ['#/src/third_party/boost'], + 'CPPPATH': ['#/src/third_party/boost'], # We could narror further to just clang on Darwin, but there is # little harm in applying for all clang. - 'NOERROR_FOR_UNKNOWN_WARNING_OPTION_GEN' : NoErrorForUnknownWarningOptionGenerator, - 'CCFLAGS' : ['$NOERROR_FOR_UNKNOWN_WARNING_OPTION_GEN'] if env.ToolchainIs('clang') else [] + 'NOERROR_FOR_UNKNOWN_WARNING_OPTION_GEN': NoErrorForUnknownWarningOptionGenerator, + 'CCFLAGS': ['$NOERROR_FOR_UNKNOWN_WARNING_OPTION_GEN'] if env.ToolchainIs('clang') else [] } if not use_system_version_of_library('snappy'): thirdPartyEnvironmentModifications['snappy'] = { - 'CPPPATH' : ['#/src/third_party/snappy' + snappySuffix], + 'CPPPATH': ['#/src/third_party/snappy' + snappySuffix], } # Valgrind is a header only include as valgrind.h includes everything we need if not use_system_version_of_library('valgrind'): thirdPartyEnvironmentModifications['valgrind'] = { - 'CPPPATH' : ['#/src/third_party/valgrind/include'], + 'CPPPATH': ['#/src/third_party/valgrind/include'], } if not use_system_version_of_library('zlib'): thirdPartyEnvironmentModifications['zlib'] = { - 'CPPPATH' : ['#/src/third_party/zlib' + zlibSuffix], + 'CPPPATH': ['#/src/third_party/zlib' + zlibSuffix], } if not use_system_version_of_library('zstd'): thirdPartyEnvironmentModifications['zstd'] = { - 'CPPPATH' : ['#/src/third_party/zstandard/zstd/lib'], + 'CPPPATH': ['#/src/third_party/zstandard/zstd/lib'], } if not use_system_version_of_library('google-benchmark'): thirdPartyEnvironmentModifications['benchmark'] = { - 'CPPPATH' : ['#/src/third_party/benchmark/dist/include'], + 'CPPPATH': ['#/src/third_party/benchmark/dist/include'], } # TODO: figure out if we want to offer system versions of mozjs. Mozilla @@ -146,24 +131,23 @@ if not use_system_version_of_library('google-benchmark'): #if not use_system_version_of_library('mozjs'): if True: thirdPartyEnvironmentModifications['mozjs'] = { - 'CPPPATH' : [ + 'CPPPATH': [ '#/src/third_party/mozjs/include', '#/src/third_party/mozjs/mongo_sources', - '#/src/third_party/mozjs/platform/' + env["TARGET_ARCH"] + "/" + env["TARGET_OS"] + "/include", - ], - 'FORCEINCLUDES' : [ - 'js-config.h', + '#/src/third_party/mozjs/platform/' + env["TARGET_ARCH"] + "/" + env["TARGET_OS"] + + "/include", ], + 'FORCEINCLUDES': ['js-config.h', ], } if "tom" in env["MONGO_CRYPTO"]: thirdPartyEnvironmentModifications['tomcrypt'] = { - 'CPPPATH' : ['#/src/third_party/tomcrypt' + tomcryptSuffix + '/src/headers'], + 'CPPPATH': ['#/src/third_party/tomcrypt' + tomcryptSuffix + '/src/headers'], } if not use_system_version_of_library('stemmer'): thirdPartyEnvironmentModifications['stemmer'] = { - 'CPPPATH' : ['#/src/third_party/libstemmer_c/include'], + 'CPPPATH': ['#/src/third_party/libstemmer_c/include'], } # Note that the wiredtiger.h header is generated, so @@ -171,46 +155,50 @@ if not use_system_version_of_library('stemmer'): # the source directory. if wiredtiger and not use_system_version_of_library('wiredtiger'): thirdPartyEnvironmentModifications['wiredtiger'] = { - 'CPPPATH' : ['$BUILD_DIR/third_party/wiredtiger'], + 'CPPPATH': ['$BUILD_DIR/third_party/wiredtiger'], } if not use_system_version_of_library('yaml'): thirdPartyEnvironmentModifications['yaml'] = { - 'CPPPATH' : ['#/src/third_party/yaml-cpp/yaml-cpp/include'], - 'CPPDEFINES' : ['_SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING'] if env.ToolchainIs('msvc') else [], + 'CPPPATH': ['#/src/third_party/yaml-cpp/yaml-cpp/include'], + 'CPPDEFINES': ['_SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING'] + if env.ToolchainIs('msvc') else [], } if not use_system_version_of_library('asio'): thirdPartyEnvironmentModifications['asio'] = { - 'CPPPATH' : ['#/src/third_party/asio-master/asio/include'], + 'CPPPATH': ['#/src/third_party/asio-master/asio/include'], } if not use_system_version_of_library('intel_decimal128'): thirdPartyEnvironmentModifications['intel_decimal128'] = { - 'CPPPATH' : ['#/src/third_party/IntelRDFPMathLib20U1/LIBRARY'], + 'CPPPATH': ['#/src/third_party/IntelRDFPMathLib20U1/LIBRARY'], } if not use_system_version_of_library('icu'): thirdPartyEnvironmentModifications['icu'] = { - 'CPPPATH' : ['#/src/third_party/icu4c' + icuSuffix + '/source/common', - '#/src/third_party/icu4c' + icuSuffix + '/source/i18n'], + 'CPPPATH': [ + '#/src/third_party/icu4c' + icuSuffix + '/source/common', + '#/src/third_party/icu4c' + icuSuffix + '/source/i18n', + ], } if not use_system_version_of_library('kms-message'): thirdPartyEnvironmentModifications['kms-message'] = { - 'CPPPATH' : ['#/src/third_party/kms-message/src'], - 'CPPDEFINES' :['KMS_MSG_STATIC'] + 'CPPPATH': ['#/src/third_party/kms-message/src'], + 'CPPDEFINES': ['KMS_MSG_STATIC'], } if use_system_libunwind: thirdPartyEnvironmentModifications['unwind'] = { - 'SYSLIBDEPS_PRIVATE' : [env['LIBDEPS_UNWIND_SYSLIBDEP'], env['LIBDEPS_LZMA_SYSLIBDEP']], + 'SYSLIBDEPS_PRIVATE': [env['LIBDEPS_UNWIND_SYSLIBDEP'], env['LIBDEPS_LZMA_SYSLIBDEP']], } elif use_vendored_libunwind: thirdPartyEnvironmentModifications['unwind'] = { - 'SYSLIBDEPS_PRIVATE' : [env['LIBDEPS_LZMA_SYSLIBDEP']], + 'SYSLIBDEPS_PRIVATE': [env['LIBDEPS_LZMA_SYSLIBDEP']], } + def injectThirdParty(thisEnv, libraries=[], parts=[]): libraries = thisEnv.Flatten([libraries]) parts = thisEnv.Flatten([parts]) @@ -222,7 +210,8 @@ def injectThirdParty(thisEnv, libraries=[], parts=[]): thisEnv.PrependUnique(**mods) else: for part in parts: - thisEnv.PrependUnique({part : mods[part]}) + thisEnv.PrependUnique({part: mods[part]}) + env.AddMethod(injectThirdParty, 'InjectThirdParty') @@ -233,7 +222,7 @@ env = env.Clone() # different empty source file for every third-party library, as we did # in the past. -empty_source=env.Textfile( +empty_source = env.Textfile( target='third_party_shim.cpp', source=str(), ) @@ -244,6 +233,7 @@ empty_object = env.LibraryObject( source=empty_source, ) + def shim_library(env, name, **kwargs): # Add the 'virtual-libdep' tag, which will prevent shim libraries # from actually being linked to. They don't provide any symbols, @@ -260,12 +250,13 @@ def shim_library(env, name, **kwargs): AIB_IGNORE=True, **kwargs, ) + + env.AddMethod(shim_library, 'ShimLibrary') murmurEnv = env.Clone() murmurEnv.InjectThirdParty(libraries=['fmt']) -murmurEnv.SConscript('murmurhash3/SConscript', exports={ 'env' : murmurEnv }) - +murmurEnv.SConscript('murmurhash3/SConscript', exports={'env': murmurEnv}) s2Env = env.Clone() s2Env.InjectThirdParty(libraries=[ @@ -277,19 +268,16 @@ s2Env.InjectThirdParty(libraries=[ 'variant', ]) s2Env.InjectMongoIncludePaths() -s2Env.SConscript('s2/SConscript', exports={'env' : s2Env}) +s2Env.SConscript('s2/SConscript', exports={'env': s2Env}) if use_libunwind: - unwindEnv = env.Clone( - LIBDEPS_NO_INHERIT=[ - '$BUILD_DIR/third_party/shim_allocator', - ], - ) + unwindEnv = env.Clone(LIBDEPS_NO_INHERIT=[ + '$BUILD_DIR/third_party/shim_allocator', + ], ) if use_system_libunwind: - unwindEnv = unwindEnv.Clone( - SYSLIBDEPS=[ - env['LIBDEPS_UNWIND_SYSLIBDEP'], - ]) + unwindEnv = unwindEnv.Clone(SYSLIBDEPS=[ + env['LIBDEPS_UNWIND_SYSLIBDEP'], + ]) else: unwindEnv = unwindEnv.Clone() @@ -299,71 +287,61 @@ if use_libunwind: unwindEnv['ASPPCOM'] = unwindEnv['ASPPCOM'].replace('$CC ', '$ASPP ') def registerConsumerModifications(env, **kwargs): - for k,v in kwargs.items(): + for k, v in kwargs.items(): thirdPartyEnvironmentModifications['unwind'][k] = v unwindEnv.AddMethod(registerConsumerModifications, 'RegisterConsumerModifications') - unwindEnv.SConscript('unwind/SConscript', exports={'env' : unwindEnv}) - unwindEnv.Append( - LIBDEPS_INTERFACE=[ - 'unwind/unwind', - ]) - - unwindEnv.ShimLibrary( - name="unwind", - ) + unwindEnv.SConscript('unwind/SConscript', exports={'env': unwindEnv}) + unwindEnv.Append(LIBDEPS_INTERFACE=[ + 'unwind/unwind', + ]) + + unwindEnv.ShimLibrary(name="unwind", ) fmtEnv = env.Clone() if use_system_version_of_library("fmt"): - fmtEnv = fmtEnv.Clone( - SYSLIBDEPS=[ - env['LIBDEPS_FMT_SYSLIBDEP'], - ]) + fmtEnv = fmtEnv.Clone(SYSLIBDEPS=[ + env['LIBDEPS_FMT_SYSLIBDEP'], + ]) else: fmtEnv = fmtEnv.Clone() fmtEnv.InjectThirdParty(libraries=['fmt']) fmtEnv.InjectMongoIncludePaths() - fmtEnv.SConscript('fmt/SConscript', exports={'env' : fmtEnv}) - fmtEnv = fmtEnv.Clone( - LIBDEPS_INTERFACE=[ - 'fmt/fmt', - ]) + fmtEnv.SConscript('fmt/SConscript', exports={'env': fmtEnv}) + fmtEnv = fmtEnv.Clone(LIBDEPS_INTERFACE=[ + 'fmt/fmt', + ]) fmtEnv.ShimLibrary(name="fmt") - pcreEnv = env.Clone() if use_system_version_of_library("pcre"): - pcreEnv = pcreEnv.Clone( - SYSLIBDEPS=[ - env['LIBDEPS_PCRE_SYSLIBDEP'], - env['LIBDEPS_PCRECPP_SYSLIBDEP'], - ]) + pcreEnv = pcreEnv.Clone(SYSLIBDEPS=[ + env['LIBDEPS_PCRE_SYSLIBDEP'], + env['LIBDEPS_PCRECPP_SYSLIBDEP'], + ]) else: pcreEnv = pcreEnv.Clone() pcreEnv.InjectThirdParty(libraries=['pcre']) - pcreEnv.SConscript('pcre' + pcreSuffix + '/SConscript', exports={ 'env' : pcreEnv }) - pcreEnv = pcreEnv.Clone( - LIBDEPS_INTERFACE=[ - 'pcre' + pcreSuffix + '/pcrecpp', - ]) + pcreEnv.SConscript('pcre' + pcreSuffix + '/SConscript', exports={'env': pcreEnv}) + pcreEnv = pcreEnv.Clone(LIBDEPS_INTERFACE=[ + 'pcre' + pcreSuffix + '/pcrecpp', + ]) pcreEnv.ShimLibrary(name="pcrecpp") pcre2Env = env.Clone() if use_system_version_of_library("pcre2"): - pcre2Env = pcre2Env.Clone( - SYSLIBDEPS=[ - env['LIBDEPS_PCRE2_SYSLIBDEP'], - ]) + pcre2Env = pcre2Env.Clone(SYSLIBDEPS=[ + env['LIBDEPS_PCRE2_SYSLIBDEP'], + ]) else: pcre2Env = pcre2Env.Clone() pcre2Env.InjectThirdParty(libraries=['pcre2']) - pcre2Env.SConscript('pcre2' + '/SConscript', exports={ 'env' : pcre2Env }) - pcre2Env = pcre2Env.Clone( - LIBDEPS_INTERFACE=[ - 'pcre2/pcre2', - ]) + pcre2Env.SConscript('pcre2' + '/SConscript', exports={'env': pcre2Env}) + pcre2Env = pcre2Env.Clone(LIBDEPS_INTERFACE=[ + 'pcre2/pcre2', + ]) pcre2Env.ShimLibrary(name="pcre2") @@ -372,170 +350,153 @@ if use_system_version_of_library("boost"): # On windows, we don't need the syslibdeps because autolib will select the right libraries # for us automatically. if not env.TargetOSIs('windows'): - boostEnv = boostEnv.Clone( - SYSLIBDEPS=[ - env['LIBDEPS_BOOST_PROGRAM_OPTIONS_SYSLIBDEP'], - env['LIBDEPS_BOOST_FILESYSTEM_SYSLIBDEP'], - env['LIBDEPS_BOOST_SYSTEM_SYSLIBDEP'], - env['LIBDEPS_BOOST_IOSTREAMS_SYSLIBDEP'], - env['LIBDEPS_BOOST_THREAD_SYSLIBDEP'], - env['LIBDEPS_BOOST_LOG_SYSLIBDEP'], - ]) + boostEnv = boostEnv.Clone(SYSLIBDEPS=[ + env['LIBDEPS_BOOST_PROGRAM_OPTIONS_SYSLIBDEP'], + env['LIBDEPS_BOOST_FILESYSTEM_SYSLIBDEP'], + env['LIBDEPS_BOOST_SYSTEM_SYSLIBDEP'], + env['LIBDEPS_BOOST_IOSTREAMS_SYSLIBDEP'], + env['LIBDEPS_BOOST_THREAD_SYSLIBDEP'], + env['LIBDEPS_BOOST_LOG_SYSLIBDEP'], + ]) else: boostDirectory = 'boost' boostEnv = boostEnv.Clone() boostEnv.InjectThirdParty(libraries=['boost']) - boostEnv.SConscript(boostDirectory + '/SConscript', exports={ 'env' : boostEnv }) - boostEnv = boostEnv.Clone( - LIBDEPS_INTERFACE=[ - boostDirectory + '/boost_filesystem', - boostDirectory + '/boost_iostreams', - boostDirectory + '/boost_log', - boostDirectory + '/boost_program_options', - boostDirectory + '/boost_system', - ]) + boostEnv.SConscript(boostDirectory + '/SConscript', exports={'env': boostEnv}) + boostEnv = boostEnv.Clone(LIBDEPS_INTERFACE=[ + boostDirectory + '/boost_filesystem', + boostDirectory + '/boost_iostreams', + boostDirectory + '/boost_log', + boostDirectory + '/boost_program_options', + boostDirectory + '/boost_system', + ]) boostEnv.ShimLibrary(name="boost") abseilDirectory = 'abseil-cpp-master' abseilEnv = env.Clone() abseilEnv.InjectThirdParty(libraries=['abseil-cpp']) -abseilEnv.SConscript(abseilDirectory + '/SConscript', exports={ 'env' : abseilEnv }) -abseilEnv = abseilEnv.Clone( - LIBDEPS_INTERFACE=[ - abseilDirectory + '/absl_container', - abseilDirectory + '/absl_hash', - abseilDirectory + '/absl_numeric', - ]) +abseilEnv.SConscript(abseilDirectory + '/SConscript', exports={'env': abseilEnv}) +abseilEnv = abseilEnv.Clone(LIBDEPS_INTERFACE=[ + abseilDirectory + '/absl_container', + abseilDirectory + '/absl_hash', + abseilDirectory + '/absl_numeric', +]) abseilEnv.ShimLibrary(name="abseil") snappyEnv = env.Clone() if use_system_version_of_library("snappy"): - snappyEnv = snappyEnv.Clone( - SYSLIBDEPS=[ - env['LIBDEPS_SNAPPY_SYSLIBDEP'], - ]) + snappyEnv = snappyEnv.Clone(SYSLIBDEPS=[ + env['LIBDEPS_SNAPPY_SYSLIBDEP'], + ]) else: snappyEnv = snappyEnv.Clone() snappyEnv.InjectThirdParty(libraries=['snappy']) snappyEnv.InjectMongoIncludePaths() - snappyEnv.SConscript('snappy' + snappySuffix + '/SConscript', exports={ 'env' : snappyEnv }) - snappyEnv = snappyEnv.Clone( - LIBDEPS_INTERFACE=[ - 'snappy' + snappySuffix + '/snappy', - ]) + snappyEnv.SConscript('snappy' + snappySuffix + '/SConscript', exports={'env': snappyEnv}) + snappyEnv = snappyEnv.Clone(LIBDEPS_INTERFACE=[ + 'snappy' + snappySuffix + '/snappy', + ]) snappyEnv.ShimLibrary(name="snappy") zlibEnv = env.Clone() if use_system_version_of_library("zlib"): - zlibEnv = zlibEnv.Clone( - SYSLIBDEPS=[ - env['LIBDEPS_ZLIB_SYSLIBDEP'], - ]) + zlibEnv = zlibEnv.Clone(SYSLIBDEPS=[ + env['LIBDEPS_ZLIB_SYSLIBDEP'], + ]) else: zlibEnv = zlibEnv.Clone() zlibEnv.InjectThirdParty(libraries=['zlib']) - zlibEnv.SConscript('zlib' + zlibSuffix + '/SConscript', exports={ 'env' : zlibEnv }) - zlibEnv = zlibEnv.Clone( - LIBDEPS_INTERFACE=[ - 'zlib' + zlibSuffix + '/zlib', - ]) + zlibEnv.SConscript('zlib' + zlibSuffix + '/SConscript', exports={'env': zlibEnv}) + zlibEnv = zlibEnv.Clone(LIBDEPS_INTERFACE=[ + 'zlib' + zlibSuffix + '/zlib', + ]) -zlibEnv.ShimLibrary( - name="zlib", -) +zlibEnv.ShimLibrary(name="zlib", ) zstdEnv = env.Clone() if use_system_version_of_library("zstd"): - zstdEnv = zstdEnv.Clone( - SYSLIBDEPS=[ - env['LIBDEPS_ZSTD_SYSLIBDEP'], - ]) + zstdEnv = zstdEnv.Clone(SYSLIBDEPS=[ + env['LIBDEPS_ZSTD_SYSLIBDEP'], + ]) else: zstdEnv = zstdEnv.Clone() zstdEnv.InjectThirdParty(libraries=['zstd']) - zstdEnv.SConscript('zstandard/SConscript', exports={ 'env' : zstdEnv }) - zstdEnv = zstdEnv.Clone( - LIBDEPS_INTERFACE=[ - 'zstandard/zstd', - ]) + zstdEnv.SConscript('zstandard/SConscript', exports={'env': zstdEnv}) + zstdEnv = zstdEnv.Clone(LIBDEPS_INTERFACE=[ + 'zstandard/zstd', + ]) -zstdEnv.ShimLibrary( - name="zstd", -) +zstdEnv.ShimLibrary(name="zstd", ) benchmarkEnv = env.Clone() if use_system_version_of_library("google-benchmark"): - benchmarkEnv = benchmarkEnv.Clone( - SYSLIBDEPS=[ - env['LIBDEPS_BENCHMARK_SYSLIBDEP'], - ]) + benchmarkEnv = benchmarkEnv.Clone(SYSLIBDEPS=[ + env['LIBDEPS_BENCHMARK_SYSLIBDEP'], + ]) else: benchmarkEnv = benchmarkEnv.Clone() benchmarkEnv.InjectThirdParty(libraries=['benchmark']) benchmarkEnv.SConscript( 'benchmark/SConscript', - exports={ 'env' : benchmarkEnv }) - benchmarkEnv = benchmarkEnv.Clone( - LIBDEPS_INTERFACE=[ - 'benchmark/benchmark', - ]) + exports={'env': benchmarkEnv}, + ) + benchmarkEnv = benchmarkEnv.Clone(LIBDEPS_INTERFACE=[ + 'benchmark/benchmark', + ]) benchmarkEnv.ShimLibrary(name="benchmark") if jsEngine: mozjsEnv = env.Clone() - mozjsEnv.SConscript('mozjs/SConscript', exports={'env' : mozjsEnv }) - mozjsEnv = mozjsEnv.Clone( - LIBDEPS_INTERFACE=[ - 'mozjs/mozjs', - 'shim_zlib', - ]) + mozjsEnv.SConscript('mozjs/SConscript', exports={'env': mozjsEnv}) + mozjsEnv = mozjsEnv.Clone(LIBDEPS_INTERFACE=[ + 'mozjs/mozjs', + 'shim_zlib', + ]) mozjsEnv.ShimLibrary(name="mozjs") if "tom" in env["MONGO_CRYPTO"]: tomcryptEnv = env.Clone() - tomcryptEnv.SConscript('tomcrypt' + tomcryptSuffix + '/SConscript', exports={'env' : tomcryptEnv }) - tomcryptEnv = tomcryptEnv.Clone( - LIBDEPS_INTERFACE=[ - 'tomcrypt' + tomcryptSuffix + '/tomcrypt', - ]) - - tomcryptEnv.ShimLibrary( - name="tomcrypt", + tomcryptEnv.SConscript( + 'tomcrypt' + tomcryptSuffix + '/SConscript', + exports={'env': tomcryptEnv}, ) + tomcryptEnv = tomcryptEnv.Clone(LIBDEPS_INTERFACE=[ + 'tomcrypt' + tomcryptSuffix + '/tomcrypt', + ]) + tomcryptEnv.ShimLibrary(name="tomcrypt", ) -gperftoolsEnv = env.Clone( - LIBDEPS_NO_INHERIT=[ - '$BUILD_DIR/third_party/shim_allocator', - ], -) +gperftoolsEnv = env.Clone(LIBDEPS_NO_INHERIT=[ + '$BUILD_DIR/third_party/shim_allocator', +], ) if gperftoolsEnv['MONGO_ALLOCATOR'] in ["tcmalloc", "tcmalloc-experimental"]: if use_system_version_of_library("tcmalloc"): - gperftoolsEnv = gperftoolsEnv.Clone( - SYSLIBDEPS=[ - env['LIBDEPS_TCMALLOC_SYSLIBDEP'], + gperftoolsEnv = gperftoolsEnv.Clone(SYSLIBDEPS=[ + env['LIBDEPS_TCMALLOC_SYSLIBDEP'], ]) else: gperftoolsEnv = gperftoolsEnv.Clone() gperftoolsEnv.InjectThirdParty(libraries=['gperftools']) + # Allow gperftools to determine its own consumer-side include/ dirs. # Needed because those are in a platform-specific subdirectory. def registerConsumerModifications(env, **kwargs): for k, v in kwargs.items(): thirdPartyEnvironmentModifications['gperftools'][k] = v + gperftoolsEnv.AddMethod(registerConsumerModifications, 'RegisterConsumerModifications') gperftoolsEnv.SConscript( 'gperftools' + '/SConscript', - exports={'env' : gperftoolsEnv}) - gperftoolsEnv = gperftoolsEnv.Clone( - LIBDEPS_INTERFACE=[ - 'gperftools/tcmalloc_minimal', - ]) + exports={'env': gperftoolsEnv}, + ) + gperftoolsEnv = gperftoolsEnv.Clone(LIBDEPS_INTERFACE=[ + 'gperftools/tcmalloc_minimal', + ]) gperftoolsEnv.ShimLibrary( name="allocator", @@ -549,72 +510,61 @@ gperftoolsEnv.ShimLibrary( # This tag allows this dependency to be linked to nodes marked as not # allowed to have public dependencies. 'lint-public-dep-allowed' - ] + ], ) - stemmerEnv = env.Clone() if use_system_version_of_library("stemmer"): - stemmerEnv = stemmerEnv.Clone( - SYSLIBDEPS=[ - env['LIBDEPS_STEMMER_SYSLIBDEP'], - ]) + stemmerEnv = stemmerEnv.Clone(SYSLIBDEPS=[ + env['LIBDEPS_STEMMER_SYSLIBDEP'], + ]) else: stemmerEnv = stemmerEnv.Clone() stemmerEnv.InjectThirdParty(libraries=['stemmer']) - stemmerEnv.SConscript('libstemmer_c/SConscript', exports={ 'env' : stemmerEnv }) - stemmerEnv = stemmerEnv.Clone( - LIBDEPS_INTERFACE=[ - 'libstemmer_c/stemmer', - ]) + stemmerEnv.SConscript('libstemmer_c/SConscript', exports={'env': stemmerEnv}) + stemmerEnv = stemmerEnv.Clone(LIBDEPS_INTERFACE=[ + 'libstemmer_c/stemmer', + ]) stemmerEnv.ShimLibrary(name="stemmer") - yamlEnv = env.Clone() if use_system_version_of_library("yaml"): - yamlEnv = yamlEnv.Clone( - SYSLIBDEPS=[ - env['LIBDEPS_YAML_SYSLIBDEP'], - ]) + yamlEnv = yamlEnv.Clone(SYSLIBDEPS=[ + env['LIBDEPS_YAML_SYSLIBDEP'], + ]) else: yamlEnv = yamlEnv.Clone() yamlEnv.InjectThirdParty(libraries=['yaml', 'boost']) - yamlEnv.SConscript('yaml-cpp/SConscript', exports={ 'env' : yamlEnv }) - yamlEnv = yamlEnv.Clone( - LIBDEPS_INTERFACE=[ - 'yaml-cpp/yaml', - ]) + yamlEnv.SConscript('yaml-cpp/SConscript', exports={'env': yamlEnv}) + yamlEnv = yamlEnv.Clone(LIBDEPS_INTERFACE=[ + 'yaml-cpp/yaml', + ]) yamlEnv.ShimLibrary(name="yaml") timelibEnv = env.Clone() timelibEnv.InjectThirdParty(libraries=['timelib']) -timelibEnv.SConscript('timelib' + timelibSuffix + '/SConscript', exports={ 'env' : timelibEnv }) -timelibEnv = timelibEnv.Clone( - LIBDEPS_INTERFACE=[ - 'timelib' + timelibSuffix + '/timelib', - ]) +timelibEnv.SConscript('timelib' + timelibSuffix + '/SConscript', exports={'env': timelibEnv}) +timelibEnv = timelibEnv.Clone(LIBDEPS_INTERFACE=[ + 'timelib' + timelibSuffix + '/timelib', +]) -timelibEnv.ShimLibrary( - name='timelib', -) +timelibEnv.ShimLibrary(name='timelib', ) wiredtigerEnv = env.Clone() if wiredtiger: if use_system_version_of_library("wiredtiger"): - wiredtigerEnv = wiredtigerEnv.Clone( - SYSLIBDEPS=[ - env['LIBDEPS_WIREDTIGER_SYSLIBDEP'], - ]) + wiredtigerEnv = wiredtigerEnv.Clone(SYSLIBDEPS=[ + env['LIBDEPS_WIREDTIGER_SYSLIBDEP'], + ]) else: wiredtigerEnv = wiredtigerEnv.Clone() wiredtigerEnv.InjectThirdParty(libraries=['wiredtiger']) - wiredtigerEnv.SConscript('wiredtiger/SConscript', exports={ 'env' : wiredtigerEnv }) - wiredtigerEnv = wiredtigerEnv.Clone( - LIBDEPS_INTERFACE=[ - 'wiredtiger/wiredtiger', - ]) + wiredtigerEnv.SConscript('wiredtiger/SConscript', exports={'env': wiredtigerEnv}) + wiredtigerEnv = wiredtigerEnv.Clone(LIBDEPS_INTERFACE=[ + 'wiredtiger/wiredtiger', + ]) wiredtigerEnv.ShimLibrary(name="wiredtiger") @@ -627,71 +577,60 @@ if use_system_version_of_library("asio"): else: asioEnv = asioEnv.Clone() asioEnv.InjectThirdParty(libraries=['asio']) - asioEnv.SConscript('asio-master/SConscript', exports={ 'env' : asioEnv }) - asioEnv = asioEnv.Clone( - LIBDEPS_INTERFACE=[ - 'asio-master/asio', - ]) + asioEnv.SConscript('asio-master/SConscript', exports={'env': asioEnv}) + asioEnv = asioEnv.Clone(LIBDEPS_INTERFACE=[ + 'asio-master/asio', + ]) asioEnv.ShimLibrary(name="asio") intelDecimal128Env = env.Clone() if use_system_version_of_library("intel_decimal128"): - intelDecimal128Env = intelDecimal128Env.Clone( - SYSLIBDEPS=[ - env['LIBDEPS_INTEL_DECIMAL128_SYSLIBDEP'], - ]) + intelDecimal128Env = intelDecimal128Env.Clone(SYSLIBDEPS=[ + env['LIBDEPS_INTEL_DECIMAL128_SYSLIBDEP'], + ]) else: intelDecimal128Env = intelDecimal128Env.Clone() intelDecimal128Env.InjectThirdParty(libraries=['intel_decimal128']) - intelDecimal128Env.SConscript('IntelRDFPMathLib20U1/SConscript', exports={ 'env' : intelDecimal128Env }) - intelDecimal128Env = intelDecimal128Env.Clone( - LIBDEPS_INTERFACE=[ - 'IntelRDFPMathLib20U1/intel_decimal128', - ]) - -intelDecimal128Env.ShimLibrary( - name="intel_decimal128", -) + intelDecimal128Env.SConscript( + 'IntelRDFPMathLib20U1/SConscript', + exports={'env': intelDecimal128Env}, + ) + intelDecimal128Env = intelDecimal128Env.Clone(LIBDEPS_INTERFACE=[ + 'IntelRDFPMathLib20U1/intel_decimal128', + ]) + +intelDecimal128Env.ShimLibrary(name="intel_decimal128", ) icuEnv = env.Clone() if use_system_version_of_library("icu"): - icuEnv = icuEnv.Clone( - SYSLIBDEPS=[ - env['LIBDEPS_ICUDATA_SYSLIBDEP'], - env['LIBDEPS_ICUI18N_SYSLIBDEP'], - env['LIBDEPS_ICUUC_SYSLIBDEP'], - ]) + icuEnv = icuEnv.Clone(SYSLIBDEPS=[ + env['LIBDEPS_ICUDATA_SYSLIBDEP'], + env['LIBDEPS_ICUI18N_SYSLIBDEP'], + env['LIBDEPS_ICUUC_SYSLIBDEP'], + ]) else: icuEnv = icuEnv.Clone() icuEnv.InjectThirdParty(libraries=['icu']) - icuEnv.SConscript('icu4c' + icuSuffix + '/source/SConscript', exports={ 'env' : icuEnv }) - icuEnv = icuEnv.Clone( - LIBDEPS_INTERFACE=[ - 'icu4c' + icuSuffix + '/source/icu_i18n', - ]) + icuEnv.SConscript('icu4c' + icuSuffix + '/source/SConscript', exports={'env': icuEnv}) + icuEnv = icuEnv.Clone(LIBDEPS_INTERFACE=[ + 'icu4c' + icuSuffix + '/source/icu_i18n', + ]) -icuEnv.ShimLibrary( - name="icu", -) +icuEnv.ShimLibrary(name="icu", ) kmsEnv = env.Clone() if get_option('ssl') == 'on': if use_system_version_of_library("kms-message"): - kmsEnv = kmsEnv.Clone( - SYSLIBDEPS=[ - env['LIBDEPS_KMS-MESSAGE_SYSLIBDEP'], - ]) + kmsEnv = kmsEnv.Clone(SYSLIBDEPS=[ + env['LIBDEPS_KMS-MESSAGE_SYSLIBDEP'], + ]) else: kmsEnv = kmsEnv.Clone() kmsEnv.InjectThirdParty(libraries=['kms-message']) - kmsEnv.SConscript('kms-message/SConscript', exports={ 'env' : kmsEnv }) - kmsEnv = kmsEnv.Clone( - LIBDEPS_INTERFACE=[ - 'kms-message/kms-message', - ]) - - kmsEnv.ShimLibrary( - name="kms_message", - ) + kmsEnv.SConscript('kms-message/SConscript', exports={'env': kmsEnv}) + kmsEnv = kmsEnv.Clone(LIBDEPS_INTERFACE=[ + 'kms-message/kms-message', + ]) + kmsEnv.ShimLibrary(name="kms_message", ) diff --git a/src/third_party/abseil-cpp-master/SConscript b/src/third_party/abseil-cpp-master/SConscript index 3e960562068..f65389ad7d4 100644 --- a/src/third_party/abseil-cpp-master/SConscript +++ b/src/third_party/abseil-cpp-master/SConscript @@ -6,9 +6,9 @@ env.InjectThirdParty(libraries=['abseil-cpp']) env.Library( target="absl_numeric", - source = [ - "abseil-cpp/absl/numeric/int128.cc", - ] + source=[ + "abseil-cpp/absl/numeric/int128.cc", + ], ) env.Library( @@ -17,7 +17,7 @@ env.Library( "abseil-cpp/absl/hash/internal/city.cc", "abseil-cpp/absl/hash/internal/hash.cc", "abseil-cpp/absl/hash/internal/wyhash.cc", - ] + ], ) env.Library( @@ -28,7 +28,7 @@ env.Library( LIBDEPS=[ "absl_hash", "absl_throw_delegate", - ] + ], ) env.Library( @@ -36,6 +36,5 @@ env.Library( source=[ "abseil-cpp/absl/base/internal/throw_delegate.cc", ], - LIBDEPS=[ - ] + LIBDEPS=[], ) diff --git a/src/third_party/asio-master/SConscript b/src/third_party/asio-master/SConscript index e0c423ce5b4..136f34ae6f0 100644 --- a/src/third_party/asio-master/SConscript +++ b/src/third_party/asio-master/SConscript @@ -11,5 +11,5 @@ env.InjectThirdParty(libraries=['boost']) env.Library( target="asio", - source=asio_src + source=asio_src, ) diff --git a/src/third_party/benchmark/SConscript b/src/third_party/benchmark/SConscript index 8b2feb693c0..5b11b380ab6 100644 --- a/src/third_party/benchmark/SConscript +++ b/src/third_party/benchmark/SConscript @@ -21,27 +21,31 @@ env.Append( ], ) -src_dir=env.Dir('dist/src') +src_dir = env.Dir('dist/src') env.Library( target="benchmark", - source=env.File([ - 'benchmark_api_internal.cc', - 'benchmark.cc', - 'benchmark_name.cc', - 'benchmark_register.cc', - 'benchmark_runner.cc', - 'colorprint.cc', - 'commandlineflags.cc', - 'complexity.cc', - 'console_reporter.cc', - 'counter.cc', - 'csv_reporter.cc', - 'json_reporter.cc', - 'reporter.cc', - 'sleep.cc', - 'statistics.cc', - 'string_util.cc', - 'sysinfo.cc', - 'timers.cc', - ], src_dir)) + source=env.File( + [ + 'benchmark_api_internal.cc', + 'benchmark.cc', + 'benchmark_name.cc', + 'benchmark_register.cc', + 'benchmark_runner.cc', + 'colorprint.cc', + 'commandlineflags.cc', + 'complexity.cc', + 'console_reporter.cc', + 'counter.cc', + 'csv_reporter.cc', + 'json_reporter.cc', + 'reporter.cc', + 'sleep.cc', + 'statistics.cc', + 'string_util.cc', + 'sysinfo.cc', + 'timers.cc', + ], + src_dir, + ), +) diff --git a/src/third_party/boost/SConscript b/src/third_party/boost/SConscript index 2c7e4456d43..e017a7b1ea5 100644 --- a/src/third_party/boost/SConscript +++ b/src/third_party/boost/SConscript @@ -72,68 +72,70 @@ env.Library( ) env.Library( - target='boost_iostreams', + target='boost_iostreams', source=[ 'libs/iostreams/src/file_descriptor.cpp', 'libs/iostreams/src/mapped_file.cpp', - ], - LIBDEPS=[ - '$BUILD_DIR/mongo/util/boost_assert_shim', - 'boost_system', - ]) + ], + LIBDEPS=[ + '$BUILD_DIR/mongo/util/boost_assert_shim', + 'boost_system', + ], +) -boost_thread_source = dict( - posix=[ - 'libs/thread/src/pthread/once.cpp', - 'libs/thread/src/pthread/thread.cpp' - ], +boost_thread_source = dict( + posix=['libs/thread/src/pthread/once.cpp', 'libs/thread/src/pthread/thread.cpp'], windows=[ - 'libs/thread/src/win32/thread.cpp', + 'libs/thread/src/win32/thread.cpp', 'libs/thread/src/win32/thread_primitives.cpp', 'libs/thread/src/win32/tss_dll.cpp', 'libs/thread/src/win32/tss_pe.cpp', - ] -).get(env['TARGET_OS_FAMILY'], 'UNKNOWN_OS_FAMILY_FOR_BOOST_THREADS__%s' % env['TARGET_OS_FAMILY']) + ], +).get( + env['TARGET_OS_FAMILY'], + 'UNKNOWN_OS_FAMILY_FOR_BOOST_THREADS__%s' % env['TARGET_OS_FAMILY'], +) -boost_thread_defines = dict( - posix=['BOOST_THREAD_PTHREAD'], - windows=['BOOST_THREAD_WIN32'] -).get(env['TARGET_OS_FAMILY'], 'UNKNOWN_OS_FAMILY_FOR_BOOST_THREADS__%s' % env['TARGET_OS_FAMILY']) +boost_thread_defines = dict( + posix=['BOOST_THREAD_PTHREAD'], + windows=['BOOST_THREAD_WIN32'], +).get( + env['TARGET_OS_FAMILY'], + 'UNKNOWN_OS_FAMILY_FOR_BOOST_THREADS__%s' % env['TARGET_OS_FAMILY'], +) threadlib_env = env.Clone() threadlib_env.Append(CPPDEFINES=['BOOST_THREAD_BUILD_LIB'] + boost_thread_defines) threadlib_env.Library( - target='boost_thread', + target='boost_thread', source=[ 'libs/thread/src/future.cpp', ] + boost_thread_source, LIBDEPS=[ '$BUILD_DIR/mongo/util/boost_assert_shim', - ] + ], ) loglib_env = env.Clone() -loglib_env.AppendUnique( - CPPDEFINES=[ - 'BOOST_LOG_USE_COMPILER_TLS', - 'BOOST_LOG_USE_STD_REGEX', - 'BOOST_LOG_WITHOUT_DEFAULT_FACTORIES', - 'BOOST_LOG_WITHOUT_IPC', - 'BOOST_LOG_WITHOUT_SETTINGS_PARSERS', - ]) +loglib_env.AppendUnique(CPPDEFINES=[ + 'BOOST_LOG_USE_COMPILER_TLS', + 'BOOST_LOG_USE_STD_REGEX', + 'BOOST_LOG_WITHOUT_DEFAULT_FACTORIES', + 'BOOST_LOG_WITHOUT_IPC', + 'BOOST_LOG_WITHOUT_SETTINGS_PARSERS', +]) if env.ToolchainIs('msvc'): - # warning C4828: The file contains a character starting at offset 0x6009 that is illegal in + # warning C4828: The file contains a character starting at offset 0x6009 that is illegal in # the current source character set (codepage 65001). loglib_env.AppendUnique(CCFLAGS=['/wd4828']) # permissions.cpp includes windows.h directly, causing issues with boost winapi (error C2116 and C2733) - loglib_env.AppendUnique( - CPPDEFINES=[ + loglib_env.AppendUnique(CPPDEFINES=[ 'BOOST_USE_WINDOWS_H', ]) loglib_env.Library( - target='boost_log', + target='boost_log', source=[ 'libs/log/src/attribute_name.cpp', 'libs/log/src/attribute_set.cpp', @@ -172,5 +174,5 @@ loglib_env.Library( '$BUILD_DIR/mongo/util/boost_assert_shim', 'boost_filesystem', 'boost_thread', - ] + ], ) diff --git a/src/third_party/fmt/SConscript b/src/third_party/fmt/SConscript index e239c9070ad..80a5f66520a 100644 --- a/src/third_party/fmt/SConscript +++ b/src/third_party/fmt/SConscript @@ -15,4 +15,5 @@ env.Library( source=env.File([ 'format.cc', 'os.cc', - ], 'dist/src')) + ], 'dist/src'), +) diff --git a/src/third_party/gperftools/SConscript b/src/third_party/gperftools/SConscript index 7589626149d..21ec1fb90f0 100644 --- a/src/third_party/gperftools/SConscript +++ b/src/third_party/gperftools/SConscript @@ -9,8 +9,7 @@ Import("selected_experimental_optimizations") env = env.Clone( # Building with hidden visibility interferes with intercepting the # libc allocation functions. - DISALLOW_VISHIDDEN=True, -) + DISALLOW_VISHIDDEN=True, ) # If we don't have a frame pointer, we need to tell tcmalloc so that # it doesn't try to select a frame pointer based unwinder like @@ -35,16 +34,13 @@ if not fp or debugBuild: CPPDEFINES=[ 'NO_FRAME_POINTER', 'TCMALLOC_DONT_PREFER_LIBUNWIND' if debugBuild else None, - ], - ) + ], ) if use_libunwind: - env.Append( - CPPDEFINES=[ - ("HAVE_LIBUNWIND_H", "1"), - 'HAVE_UCONTEXT_H', - ], - ) + env.Append(CPPDEFINES=[ + ("HAVE_LIBUNWIND_H", "1"), + 'HAVE_UCONTEXT_H', + ], ) env.InjectThirdParty(libraries=['unwind']) files = [ @@ -69,7 +65,7 @@ files = [ 'src/static_vars.cc', 'src/symbolize.cc', 'src/thread_cache.cc', - ] +] if env.TargetOSIs('windows'): files += [ @@ -77,7 +73,7 @@ if env.TargetOSIs('windows'): 'src/windows/port.cc', 'src/windows/system-alloc.cc', 'src/fake_stacktrace_scope.cc', - ] + ] # warning C4141: 'inline': used more than once # warning C4305: 'argument': truncation from 'ssize_t' to 'double' @@ -88,7 +84,7 @@ else: 'src/emergency_malloc_for_stacktrace.cc', 'src/maybe_threads.cc', 'src/system-alloc.cc', - ] + ] if not debugBuild: files += ['src/tcmalloc.cc'] @@ -98,9 +94,7 @@ else: # gperftools has some sloppy write calls that emit warnings env.Append(CXXFLAGS=["-Wno-unused-result"]) -env.Append( - CPPDEFINES=["NO_HEAP_CHECK"], -) +env.Append(CPPDEFINES=["NO_HEAP_CHECK"], ) # The build system doesn't define NDEBUG globally for historical reasons, however, TCMalloc # expects that NDEBUG is used to select between preferring the mmap or the sbrk allocator. For @@ -108,7 +102,7 @@ env.Append( # production deployment configuration. See the use of NDEBUG and kDebugMode in # src/system-alloc.cc for more details. if not debugBuild: - env.Append( CPPDEFINES=["NDEBUG"] ) + env.Append(CPPDEFINES=["NDEBUG"]) # For debug builds we want to capture stacks during (de)allocations, # but we don't want to pay that cost for release builds. For non-debug @@ -122,18 +116,22 @@ if (not debugBuild) or (not env['TARGET_ARCH'] in ['x86_64', 'i386']): gperftools_root = env.Dir("#/src/third_party/gperftools") gperftools_platform = gperftools_root.Dir("platform/${TARGET_OS}_${TARGET_ARCH}") -env.Append(CPPPATH=[gperftools_platform.Dir("internal/src"), - gperftools_root.Dir("dist/src")]) +env.Append(CPPPATH=[ + gperftools_platform.Dir("internal/src"), + gperftools_root.Dir("dist/src"), +]) # propagates to consumers that Inject (depend on) gperftools. env.RegisterConsumerModifications(CPPPATH=[gperftools_platform.Dir("include")]) + def removeIfPresent(lst, item): try: lst.remove(item) except ValueError: pass + env['CCFLAGS_WERROR'] = [] env['CXXFLAGS_WERROR'] = [] for to_remove in ["-Wsign-compare", "-Wall"]: @@ -146,13 +144,11 @@ if not env.TargetOSIs('windows'): # GCC on PowerPC under C++11 mode does not define __linux which gperftools depends on if env['TARGET_ARCH'] == 'ppc64le': - env.Append( CPPDEFINES=[ "__linux"] ) + env.Append(CPPDEFINES=["__linux"]) env.Library( target='tcmalloc_minimal', - source=[ - env.Dir('dist').File(f) for f in files - ], + source=[env.Dir('dist').File(f) for f in files], LIBDEPS_PRIVATE=[ '$BUILD_DIR/third_party/shim_unwind' if use_libunwind else [], ], diff --git a/src/third_party/icu4c-57.1/source/SConscript b/src/third_party/icu4c-57.1/source/SConscript index 35267e35a25..41b199eaf36 100644 --- a/src/third_party/icu4c-57.1/source/SConscript +++ b/src/third_party/icu4c-57.1/source/SConscript @@ -17,8 +17,7 @@ env.Append( ('U_DISABLE_RENAMING', 1), ('U_STATIC_IMPLEMENTATION', 1), ('U_USING_ICU_NAMESPACE', 0), - ], -) + ], ) if env.TargetOSIs('solaris'): # On Solaris, compile of certain files fails if the below define is not enabled. Specifically, @@ -28,11 +27,10 @@ if env.TargetOSIs('solaris'): # error because XPG4v2 programs are incompatible with C99. If we keep _XOPEN_SOURCE=600 but # force _XOPEN_SOURCE_EXTENDED=0, then <sys/feature_tests.h> chooses XPG6, which resolves the # error (since XPG6 is compatible with C99). - env.Append( - CPPDEFINES=[ - ('_XOPEN_SOURCE_EXTENDED', 0), - ], - ) + env.Append(CPPDEFINES=[ + ('_XOPEN_SOURCE_EXTENDED', 0), + ], ) + def removeIfPresent(lst, item): try: @@ -40,6 +38,7 @@ def removeIfPresent(lst, item): except ValueError: pass + env['CCFLAGS_WERROR'] = [] for to_remove in ['-Wall', '-W']: removeIfPresent(env['CCFLAGS'], to_remove) @@ -52,7 +51,6 @@ if env.TargetOSIs('windows'): # C4996: '...': was declared deprecated env.Append(CCFLAGS=['/wd4996']) - # Suppress `register` keyword warnings in FreeBSD builds if env.TargetOSIs('freebsd'): @@ -60,11 +58,9 @@ if env.TargetOSIs('freebsd'): env.Append(CCFLAGS=['-Wno-register']) i18nEnv = env.Clone() -i18nEnv.Append( - CPPDEFINES=[ - ('U_I18N_IMPLEMENTATION', 1), - ], -) +i18nEnv.Append(CPPDEFINES=[ + ('U_I18N_IMPLEMENTATION', 1), +], ) i18nEnv.Library( target='icu_i18n', source=[ @@ -273,11 +269,9 @@ i18nEnv.Library( ) commonEnv = env.Clone() -commonEnv.Append( - CPPDEFINES=[ - ('U_COMMON_IMPLEMENTATION', 1), - ], -) +commonEnv.Append(CPPDEFINES=[ + ('U_COMMON_IMPLEMENTATION', 1), +], ) commonEnv.Library( target='icu_common', source=[ diff --git a/src/third_party/kms-message/SConscript b/src/third_party/kms-message/SConscript index e54fd075efc..f33d82b9f0e 100644 --- a/src/third_party/kms-message/SConscript +++ b/src/third_party/kms-message/SConscript @@ -6,12 +6,14 @@ env = env.Clone() env['CCFLAGS_WERROR'] = [] env['CXXFLAGS_WERROR'] = [] + def removeIfPresent(lst, item): try: lst.remove(item) except ValueError: pass + for to_remove in ["-Wsign-compare", "-Wall"]: removeIfPresent(env['CCFLAGS'], to_remove) removeIfPresent(env['CFLAGS'], to_remove) diff --git a/src/third_party/libstemmer_c/SConscript b/src/third_party/libstemmer_c/SConscript index 3ffc4aefea3..62a2d2ab301 100644 --- a/src/third_party/libstemmer_c/SConscript +++ b/src/third_party/libstemmer_c/SConscript @@ -37,13 +37,13 @@ stemming_packages = [ "UTF_8_french", "UTF_8_norwegian", "UTF_8_russian", - ] +] stemmer_files = [ 'runtime/api.c', 'libstemmer/libstemmer_utf8.c', ['src_c/stem_%s.c' % p for p in stemming_packages], - ] +] myEnv = env.Clone() if myEnv.ToolchainIs('GCC', 'clang'): diff --git a/src/third_party/mozjs/SConscript b/src/third_party/mozjs/SConscript index b649e28abba..a861c315d5f 100644 --- a/src/third_party/mozjs/SConscript +++ b/src/third_party/mozjs/SConscript @@ -3,52 +3,49 @@ Import([ "get_option", "env", - ]) +]) env = env.Clone() env.InjectThirdParty(libraries=['zlib']) env['CCFLAGS_WERROR'] = [] + def removeIfPresent(lst, item): try: lst.remove(item) except ValueError: pass + for to_remove in ['-Wall', '-W', '/W3', '-Wsign-compare', '/permissive-']: removeIfPresent(env['CCFLAGS'], to_remove) # See what -D's show up in make. The AB_CD one might change, but we're little # endian only for now so I think it's sane env.Prepend(CPPDEFINES=[ - ('IMPL_MFBT', 1), - ('JS_USE_CUSTOM_ALLOCATOR', 1), - ('STATIC_JS_API', 1), - ('U_NO_DEFAULT_INCLUDE_UTF_HEADERS', 1), - ('UCONFIG_NO_BREAK_ITERATION', 1), - ('UCONFIG_NO_FORMATTING', 1), - ('UCONFIG_NO_TRANSLITERATION', 1), - ('UCONFIG_NO_REGULAR_EXPRESSIONS', 1), - ('U_CHARSET_IS_UTF8', 1), - ('U_DISABLE_RENAMING', 1), - ('U_STATIC_IMPLEMENTATION', 1), - ('U_USING_ICU_NAMESPACE', 0), - ]) + ('IMPL_MFBT', 1), + ('JS_USE_CUSTOM_ALLOCATOR', 1), + ('STATIC_JS_API', 1), + ('U_NO_DEFAULT_INCLUDE_UTF_HEADERS', 1), + ('UCONFIG_NO_BREAK_ITERATION', 1), + ('UCONFIG_NO_FORMATTING', 1), + ('UCONFIG_NO_TRANSLITERATION', 1), + ('UCONFIG_NO_REGULAR_EXPRESSIONS', 1), + ('U_CHARSET_IS_UTF8', 1), + ('U_DISABLE_RENAMING', 1), + ('U_STATIC_IMPLEMENTATION', 1), + ('U_USING_ICU_NAMESPACE', 0), +]) if get_option('spider-monkey-dbg') == "on": env.Prepend(CPPDEFINES=[ - 'DEBUG', - 'JS_DEBUG', - 'JS_GC_ZEAL', - ]) - + 'DEBUG', + 'JS_DEBUG', + 'JS_GC_ZEAL', + ]) -env.Append( - FORCEINCLUDES=[ - 'js-confdefs.h' - ], -) +env.Append(FORCEINCLUDES=['js-confdefs.h'], ) if env.TargetOSIs('windows'): env.Append( @@ -79,16 +76,13 @@ if env.TargetOSIs('windows'): # not enough arguments for function-like macro invocation '/wd4003', - ], - ) + ], ) else: - env.Append( - CXXFLAGS=[ - '-Wno-non-virtual-dtor', - '-Wno-invalid-offsetof', - '-Wno-sign-compare' - ], - ) + env.Append(CXXFLAGS=[ + '-Wno-non-virtual-dtor', + '-Wno-invalid-offsetof', + '-Wno-sign-compare', + ], ) # js/src, js/public and mfbt are the only required sources right now, that # could change in the future @@ -138,20 +132,19 @@ sources = [ if env.TargetOSIs('windows'): sources.extend([ - "extract/mozglue/misc/ConditionVariable_windows.cpp", - "extract/mozglue/misc/Mutex_windows.cpp", - "extract/mozglue/misc/TimeStamp_windows.cpp", + "extract/mozglue/misc/ConditionVariable_windows.cpp", + "extract/mozglue/misc/Mutex_windows.cpp", + "extract/mozglue/misc/TimeStamp_windows.cpp", ]) else: sources.extend([ - "extract/mozglue/misc/ConditionVariable_posix.cpp", - "extract/mozglue/misc/Mutex_posix.cpp", - "extract/mozglue/misc/TimeStamp_posix.cpp", + "extract/mozglue/misc/ConditionVariable_posix.cpp", + "extract/mozglue/misc/Mutex_posix.cpp", + "extract/mozglue/misc/TimeStamp_posix.cpp", ]) - - -sources.append( [ "extract/modules/fdlibm/{}".format(f) for f in [ +sources.append([ + "extract/modules/fdlibm/{}".format(f) for f in [ 'e_acos.cpp', 'e_acosh.cpp', 'e_asin.cpp', @@ -192,7 +185,8 @@ sources.append( [ "extract/modules/fdlibm/{}".format(f) for f in [ 's_tanh.cpp', 's_trunc.cpp', 's_truncf.cpp', -]]) + ] +]) if env.TargetOSIs('windows'): env.Prepend(CPPDEFINES=[ @@ -201,11 +195,9 @@ if env.TargetOSIs('windows'): ]) if env['TARGET_ARCH'] == 'x86_64': - env.Prepend(CPPDEFINES=[ - ("WASM_HUGE_MEMORY", "1") - ]) + env.Prepend(CPPDEFINES=[("WASM_HUGE_MEMORY", "1")]) -sourceFilePatterns=[ +sourceFilePatterns = [ "/build/*.cpp", "/build/jit/*.cpp", "/build/gc/*.cpp", @@ -249,8 +241,7 @@ env.Append( ('U_DISABLE_RENAMING', 1), ('U_STATIC_IMPLEMENTATION', 1), ('U_USING_ICU_NAMESPACE', 0), - ], -) + ], ) if env.TargetOSIs('solaris'): # On Solaris, compile of certain files fails if the below define is not enabled. Specifically, @@ -260,11 +251,10 @@ if env.TargetOSIs('solaris'): # error because XPG4v2 programs are incompatible with C99. If we keep _XOPEN_SOURCE=600 but # force _XOPEN_SOURCE_EXTENDED=0, then <sys/feature_tests.h> chooses XPG6, which resolves the # error (since XPG6 is compatible with C99). - env.Append( - CPPDEFINES=[ - ('_XOPEN_SOURCE_EXTENDED', 0), - ], - ) + env.Append(CPPDEFINES=[ + ('_XOPEN_SOURCE_EXTENDED', 0), + ], ) + def removeIfPresent(lst, item): try: @@ -272,6 +262,7 @@ def removeIfPresent(lst, item): except ValueError: pass + env['CCFLAGS_WERROR'] = [] for to_remove in ['-Wall', '-W']: removeIfPresent(env['CCFLAGS'], to_remove) @@ -284,7 +275,6 @@ if env.TargetOSIs('windows'): # C4996: '...': was declared deprecated env.Append(CCFLAGS=['/wd4996']) - # Suppress `register` keyword warnings in FreeBSD builds if env.TargetOSIs('freebsd'): diff --git a/src/third_party/pcre-8.42/SConscript b/src/third_party/pcre-8.42/SConscript index 7abb80b2f24..c929cca304e 100644 --- a/src/third_party/pcre-8.42/SConscript +++ b/src/third_party/pcre-8.42/SConscript @@ -4,16 +4,20 @@ Import("env") env = env.Clone() -env.Append( CPPDEFINES=[ "HAVE_CONFIG_H", ] ) +env.Append(CPPDEFINES=[ + "HAVE_CONFIG_H", +]) env['CCFLAGS_WERROR'] = [] + def removeIfPresent(lst, item): try: lst.remove(item) except ValueError: pass + for to_remove in ['-Wall', '-W']: removeIfPresent(env['CCFLAGS'], to_remove) @@ -38,7 +42,9 @@ elif env.TargetOSIs('solaris'): else: env.Append(CPPPATH=["build_posix"]) -env.Library( "pcrecpp", [ +env.Library( + "pcrecpp", + [ # pcre "pcre_byte_order.c", "pcre_compile.c", @@ -65,4 +71,5 @@ env.Library( "pcrecpp", [ "pcrecpp.cc", "pcre_scanner.cc", "pcre_stringpiece.cc", - ] ) + ], +) diff --git a/src/third_party/pcre2/SConscript b/src/third_party/pcre2/SConscript index c9b3c5ccadc..c0956d85374 100644 --- a/src/third_party/pcre2/SConscript +++ b/src/third_party/pcre2/SConscript @@ -4,12 +4,10 @@ Import("env") env = env.Clone() -env.Append( - CPPDEFINES=[ - ('PCRE2_CODE_UNIT_WIDTH', 8), - 'HAVE_CONFIG_H', - ], -) +env.Append(CPPDEFINES=[ + ('PCRE2_CODE_UNIT_WIDTH', 8), + 'HAVE_CONFIG_H', +], ) # Directories that include generated config.h for various platforms # @@ -61,5 +59,5 @@ env.Library( "src/pcre2_tables.c", "src/pcre2_ucd.c", "src/pcre2_valid_utf.c", - ], - ) + ], +) diff --git a/src/third_party/s2/SConscript b/src/third_party/s2/SConscript index e348f4c51c5..a7f3fbf7bca 100644 --- a/src/third_party/s2/SConscript +++ b/src/third_party/s2/SConscript @@ -30,33 +30,38 @@ if env.TargetOSIs('windows'): # conformant name: _memccpy. See online help for details env.Append(CCFLAGS=['/wd4996']) -env.Library( "s2", - [ - "s1angle.cc", - "s2.cc", - "s2cellid.cc", - "s2latlng.cc", - "s1interval.cc", - "s2cap.cc", - "s2cell.cc", - "s2cellunion.cc", - "s2edgeindex.cc", - "s2edgeutil.cc", - "s2latlngrect.cc", - "s2loop.cc", - "s2pointregion.cc", - "s2polygon.cc", - "s2polygonbuilder.cc", - "s2polyline.cc", - "s2r2rect.cc", - "s2region.cc", - "s2regioncoverer.cc", - "s2regionintersection.cc", - "s2regionunion.cc", - ], LIBDEPS=['$BUILD_DIR/third_party/s2/base/base_s2', - '$BUILD_DIR/third_party/s2/strings/strings', - '$BUILD_DIR/third_party/s2/util/coding/coding', - '$BUILD_DIR/third_party/s2/util/math/math']) +env.Library( + "s2", + [ + "s1angle.cc", + "s2.cc", + "s2cellid.cc", + "s2latlng.cc", + "s1interval.cc", + "s2cap.cc", + "s2cell.cc", + "s2cellunion.cc", + "s2edgeindex.cc", + "s2edgeutil.cc", + "s2latlngrect.cc", + "s2loop.cc", + "s2pointregion.cc", + "s2polygon.cc", + "s2polygonbuilder.cc", + "s2polyline.cc", + "s2r2rect.cc", + "s2region.cc", + "s2regioncoverer.cc", + "s2regionintersection.cc", + "s2regionunion.cc", + ], + LIBDEPS=[ + '$BUILD_DIR/third_party/s2/base/base_s2', + '$BUILD_DIR/third_party/s2/strings/strings', + '$BUILD_DIR/third_party/s2/util/coding/coding', + '$BUILD_DIR/third_party/s2/util/math/math', + ], +) #env.Program('r1interval_test', ['r1interval_test.cc'], # LIBDEPS=['s2', '$BUILD_DIR/third_party/gtest/gtest_with_main']) diff --git a/src/third_party/s2/base/SConscript b/src/third_party/s2/base/SConscript index 8e437001e0e..bb01b237c97 100755 --- a/src/third_party/s2/base/SConscript +++ b/src/third_party/s2/base/SConscript @@ -8,12 +8,12 @@ env.Append(CCFLAGS=['-Isrc/third_party/s2']) env.Library( "base_s2", - [ - "int128.cc", - "logging.cc", - "logging_mongo.cc", - "stringprintf.cc", - "strtoint.cc", + [ + "int128.cc", + "logging.cc", + "logging_mongo.cc", + "stringprintf.cc", + "strtoint.cc", ], LIBDEPS_PRIVATE=[ "$BUILD_DIR/mongo/base", diff --git a/src/third_party/s2/strings/SConscript b/src/third_party/s2/strings/SConscript index 2a44d9af587..0f8c601b73f 100755 --- a/src/third_party/s2/strings/SConscript +++ b/src/third_party/s2/strings/SConscript @@ -8,10 +8,10 @@ env.Append(CCFLAGS=['-Isrc/third_party/s2']) env.Library( "strings", - [ - "split.cc", - "stringprintf.cc", - "strutil.cc", + [ + "split.cc", + "stringprintf.cc", + "strutil.cc", ], LIBDEPS=[ '$BUILD_DIR/mongo/base', diff --git a/src/third_party/s2/util/coding/SConscript b/src/third_party/s2/util/coding/SConscript index 8dc773bf5b6..bcb44680bc7 100755 --- a/src/third_party/s2/util/coding/SConscript +++ b/src/third_party/s2/util/coding/SConscript @@ -14,11 +14,12 @@ if env.TargetOSIs('windows'): env.Library( "coding", - [ - "coder.cc", - "varint.cc", + [ + "coder.cc", + "varint.cc", ], LIBDEPS=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/third_party/s2/base/base_s2', - ]) + ], +) diff --git a/src/third_party/s2/util/math/SConscript b/src/third_party/s2/util/math/SConscript index b76175a95a0..f40d9e08bf4 100755 --- a/src/third_party/s2/util/math/SConscript +++ b/src/third_party/s2/util/math/SConscript @@ -14,11 +14,14 @@ elif env.TargetOSIs('windows'): # C4305: 'initializing': truncation from '...' to '...' env.Append(CCFLAGS=['/wd4305']) -env.Library("math", - [ "mathutil.cc", - # "mathlimits.cc", - ], - LIBDEPS=[ - '$BUILD_DIR/mongo/base', - '$BUILD_DIR/third_party/s2/base/base_s2', - ]) +env.Library( + "math", + [ + "mathutil.cc", + # "mathlimits.cc", + ], + LIBDEPS=[ + '$BUILD_DIR/mongo/base', + '$BUILD_DIR/third_party/s2/base/base_s2', + ], +) diff --git a/src/third_party/snappy-1.1.7/SConscript b/src/third_party/snappy-1.1.7/SConscript index 6102daab87e..8d134c7bea8 100644 --- a/src/third_party/snappy-1.1.7/SConscript +++ b/src/third_party/snappy-1.1.7/SConscript @@ -19,7 +19,9 @@ elif env.TargetOSIs('windows'): elif not env.TargetOSIs('windows'): env.Append(CPPPATH=["build_posix"]) -env.Append( CPPDEFINES=[ "HAVE_CONFIG_H", ] ) +env.Append(CPPDEFINES=[ + "HAVE_CONFIG_H", +]) if env.ToolchainIs('clang', 'GCC'): env.Append(CCFLAGS=['-Wno-sign-compare', '-Wno-unused-function']) @@ -30,4 +32,5 @@ env.Library( 'snappy-c.cc', 'snappy.cc', 'snappy-sinksource.cc', - ]) + ], +) diff --git a/src/third_party/tomcrypt-1.18.2/SConscript b/src/third_party/tomcrypt-1.18.2/SConscript index 56bd05143f0..b5b548eaab3 100644 --- a/src/third_party/tomcrypt-1.18.2/SConscript +++ b/src/third_party/tomcrypt-1.18.2/SConscript @@ -2,18 +2,20 @@ Import([ "env", - ]) +]) env = env.Clone() env['CCFLAGS_WERROR'] = [] + def removeIfPresent(lst, item): try: lst.remove(item) except ValueError: pass + for to_remove in ['-Wall', '-W']: removeIfPresent(env['CCFLAGS'], to_remove) @@ -21,15 +23,13 @@ env.Prepend(CPPPATH=[ 'src/headers', ]) -env.Append( - CPPDEFINES=[ - 'LTC_NO_PROTOTYPES', - ] -) +env.Append(CPPDEFINES=[ + 'LTC_NO_PROTOTYPES', +]) env.Library( target="tomcrypt", - source= [ + source=[ "src/ciphers/aes/aes.c", "src/ciphers/aes/aes_tab.c", "src/hashes/helper/hash_memory.c", diff --git a/src/third_party/unwind/SConscript b/src/third_party/unwind/SConscript index 643ae2c86bd..01b5c41d2a1 100644 --- a/src/third_party/unwind/SConscript +++ b/src/third_party/unwind/SConscript @@ -19,8 +19,7 @@ env = env.Clone( # breaks that. It also seems to interfere with building with the # sanitizers, which use linker maps that reference backtrace. This # may be an ld.gold bug. - DISALLOW_VISHIDDEN=True, -) + DISALLOW_VISHIDDEN=True, ) unwind_root = env.Dir(".").srcnode() unwind_platform = unwind_root.Dir("platform/${TARGET_OS}_${TARGET_ARCH}") @@ -122,45 +121,41 @@ elif env['TARGET_ARCH'] == 's390x': else: env.FatalError(f"{env['TARGET_ARCH']} unsupported by libunwind.") -env.Append( - CCFLAGS=[ - '-fexceptions', - '-Wno-unused-result', - '-Wno-pointer-sign', - '-Wno-incompatible-pointer-types', - '-Wno-unused-variable', - ]) +env.Append(CCFLAGS=[ + '-fexceptions', + '-Wno-unused-result', + '-Wno-pointer-sign', + '-Wno-incompatible-pointer-types', + '-Wno-unused-variable', +]) if env['TARGET_ARCH'] == 'ppc64le': - env.Append( - CCFLAGS=[ - '-Wno-unused-value' - ]) + env.Append(CCFLAGS=[ + '-Wno-unused-value', + ]) if env.ToolchainIs('clang'): env.Append(CCFLAGS=['-Wno-header-guard']) -env.Append( - CPPPATH=[ - unwind_platform.Dir("build/include"), - unwind_root.Dir("dist/src"), - unwind_root.Dir("dist/include"), - unwind_root.Dir("dist/include/tdep-${UNWIND_TARGET_ARCH}"), - ]) +env.Append(CPPPATH=[ + unwind_platform.Dir("build/include"), + unwind_root.Dir("dist/src"), + unwind_root.Dir("dist/include"), + unwind_root.Dir("dist/include/tdep-${UNWIND_TARGET_ARCH}"), +]) # propagates to consumers that inject (depend on) unwind. env.RegisterConsumerModifications( CPPPATH=[unwind_platform.Dir("install/include")], - SYSLIBDEPS_PRIVATE=[env['LIBDEPS_LZMA_SYSLIBDEP']]) + SYSLIBDEPS_PRIVATE=[env['LIBDEPS_LZMA_SYSLIBDEP']], +) -env.Append( - SYSLIBDEPS_PRIVATE=[env['LIBDEPS_LZMA_SYSLIBDEP']]) +env.Append(SYSLIBDEPS_PRIVATE=[env['LIBDEPS_LZMA_SYSLIBDEP']]) -env.Append( - CPPDEFINES=[ - 'HAVE_CONFIG_H', - '_GNU_SOURCE', - ]) +env.Append(CPPDEFINES=[ + 'HAVE_CONFIG_H', + '_GNU_SOURCE', +]) unwind_sources = unwind_common_sources + unwind_platform_sources diff --git a/src/third_party/wiredtiger/SConscript b/src/third_party/wiredtiger/SConscript index 8d2b67db115..58ee1ec818e 100644 --- a/src/third_party/wiredtiger/SConscript +++ b/src/third_party/wiredtiger/SConscript @@ -14,14 +14,14 @@ if endian == "big": env.Append(CPPDEFINES=[('WORDS_BIGENDIAN', 1)]) env.Append(CPPPATH=[ - "src/include", - ]) + "src/include", +]) # Enable asserts in debug builds if debugBuild: env.Append(CPPDEFINES=[ "HAVE_DIAGNOSTIC", - ]) + ]) # Enable optional rich logging env.Append(CPPDEFINES=["HAVE_VERBOSE"]) @@ -29,28 +29,28 @@ env.Append(CPPDEFINES=["HAVE_VERBOSE"]) conf = Configure(env) if conf.CheckFunc("fallocate"): conf.env.Append(CPPDEFINES=[ - "HAVE_FALLOCATE" + "HAVE_FALLOCATE", ]) if conf.CheckFunc("sync_file_range"): conf.env.Append(CPPDEFINES=[ - "HAVE_SYNC_FILE_RANGE" + "HAVE_SYNC_FILE_RANGE", ]) # GCC 8+ includes x86intrin.h in non-x64 versions of the compiler so limit the check to x64. if env['TARGET_ARCH'] == 'x86_64' and conf.CheckCHeader('x86intrin.h'): conf.env.Append(CPPDEFINES=[ - "HAVE_X86INTRIN_H" + "HAVE_X86INTRIN_H", ]) if conf.CheckCHeader('arm_neon.h'): conf.env.Append(CPPDEFINES=[ - "HAVE_ARM_NEON_INTRIN_H" + "HAVE_ARM_NEON_INTRIN_H", ]) -env = conf.Finish(); +env = conf.Finish() if env.TargetOSIs('windows'): env.Append(CPPPATH=["build_win"]) env.Append(CFLAGS=[ - "/wd4090" # Ignore warning about mismatched const qualifiers + "/wd4090" # Ignore warning about mismatched const qualifiers ]) if env['MONGO_ALLOCATOR'] in ['tcmalloc', 'tcmalloc-experimental']: env.InjectThirdParty(libraries=['gperftools']) @@ -75,7 +75,7 @@ elif env.TargetOSIs('linux'): env.Append(CPPDEFINES=["_GNU_SOURCE"]) else: print("Wiredtiger is not supported on this platform. " + - "Please generate an approriate wiredtiger_config.h") + "Please generate an approriate wiredtiger_config.h") Exit(1) useZlib = True @@ -95,10 +95,8 @@ for l in open(File(version_file).srcnode().abspath): if m and len(m.groups()) == 2: exec('%s=%s' % (m.group(1), m.group(2))) -if (VERSION_MAJOR == None or - VERSION_MINOR == None or - VERSION_PATCH == None or - VERSION_STRING == None): +if (VERSION_MAJOR == None or VERSION_MINOR == None or VERSION_PATCH == None + or VERSION_STRING == None): print("Failed to find version variables in " + version_file) Exit(1) @@ -114,15 +112,22 @@ wiredtiger_includes = """ """ wiredtiger_includes = textwrap.dedent(wiredtiger_includes) replacements = { - '@VERSION_MAJOR@' : VERSION_MAJOR, - '@VERSION_MINOR@' : VERSION_MINOR, - '@VERSION_PATCH@' : VERSION_PATCH, - '@VERSION_STRING@' : '"' + VERSION_STRING + '"', - '@uintmax_t_decl@': "", - '@uintptr_t_decl@': "", - '@off_t_decl@' : 'typedef int64_t wt_off_t;' if env.TargetOSIs('windows') - else "typedef off_t wt_off_t;", - '@wiredtiger_includes_decl@': wiredtiger_includes + '@VERSION_MAJOR@': + VERSION_MAJOR, + '@VERSION_MINOR@': + VERSION_MINOR, + '@VERSION_PATCH@': + VERSION_PATCH, + '@VERSION_STRING@': + '"' + VERSION_STRING + '"', + '@uintmax_t_decl@': + "", + '@uintptr_t_decl@': + "", + '@off_t_decl@': + 'typedef int64_t wt_off_t;' if env.TargetOSIs('windows') else "typedef off_t wt_off_t;", + '@wiredtiger_includes_decl@': + wiredtiger_includes, } wiredtiger_h = env.Substfile( @@ -130,12 +135,13 @@ wiredtiger_h = env.Substfile( source=[ 'src/include/wiredtiger.in', ], - SUBST_DICT=replacements) + SUBST_DICT=replacements, +) wiredtiger_ext_h = env.Install( target='.', source=[ - 'src/include/wiredtiger_ext.h' + 'src/include/wiredtiger_ext.h', ], ) @@ -159,16 +165,16 @@ env.AutoInstall( # included. # condition_map = { - 'POSIX_HOST' : not env.TargetOSIs('windows'), - 'WINDOWS_HOST' : env.TargetOSIs('windows'), - - 'ARM64_HOST' : env['TARGET_ARCH'] == 'aarch64', - 'POWERPC_HOST' : env['TARGET_ARCH'] == 'ppc64le', - 'RISCV64_HOST' : env['TARGET_ARCH'] == 'riscv64', - 'X86_HOST' : env['TARGET_ARCH'] == 'x86_64', - 'ZSERIES_HOST' : env['TARGET_ARCH'] == 's390x', + 'POSIX_HOST': not env.TargetOSIs('windows'), + 'WINDOWS_HOST': env.TargetOSIs('windows'), + 'ARM64_HOST': env['TARGET_ARCH'] == 'aarch64', + 'POWERPC_HOST': env['TARGET_ARCH'] == 'ppc64le', + 'RISCV64_HOST': env['TARGET_ARCH'] == 'riscv64', + 'X86_HOST': env['TARGET_ARCH'] == 'x86_64', + 'ZSERIES_HOST': env['TARGET_ARCH'] == 's390x', } + def filtered_filelist(f, checksum): for line in f: file_cond = line.split() @@ -178,6 +184,7 @@ def filtered_filelist(f, checksum): if line.startswith('src/checksum/') == checksum: yield file_cond[0] + filelistfile = 'dist/filelist' with open(File(filelistfile).srcnode().abspath) as filelist: wtsources = list(filtered_filelist(filelist, False)) diff --git a/src/third_party/yaml-cpp/SConscript b/src/third_party/yaml-cpp/SConscript index 6e0d5ff0d05..1c5c658391e 100644 --- a/src/third_party/yaml-cpp/SConscript +++ b/src/third_party/yaml-cpp/SConscript @@ -45,4 +45,5 @@ env.Library( "yaml-cpp/src/singledocparser.cpp", "yaml-cpp/src/stream.cpp", "yaml-cpp/src/tag.cpp", - ]) + ], +) |