0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

SERVER-48291 Remove need for individual third_party shim source files

This commit is contained in:
Andrew Morrow 2021-07-23 17:13:10 -04:00 committed by Evergreen Agent
parent 1b8d8f798c
commit 0c1e060e7e
24 changed files with 25 additions and 82 deletions

View File

@ -1264,24 +1264,6 @@ env.AddMethod(mongo_platform.env_os_is_wrapper, 'TargetOSIs')
env.AddMethod(mongo_platform.env_get_os_name_wrapper, 'GetTargetOSName')
def shim_library(env, name, needs_link=False, *args, **kwargs):
nodes = env.Library(
target=f"shim_{name}" if name else name,
source=[
f"shim_{name}.cpp" if name else name,
],
*args,
**kwargs
)
for n in nodes:
setattr(n.attributes, "needs_link", needs_link)
return nodes
env.AddMethod(shim_library, 'ShimLibrary')
def conf_error(env, msg, *args):
print(msg.format(*args))
print("See {0} for details".format(env.File('$CONFIGURELOG').abspath))

View File

@ -730,8 +730,6 @@ def _libdeps_visit(n, tsorted, marked, walking, debug=False):
_libdeps_visit_private(child, marked, walking, debug)
marked[n.target_node] = LibdepsVisitationMark.MARKED_PUBLIC
if getattr(n.target_node.attributes, "needs_link", True):
tsorted.append(n.target_node)
except DependencyCycleError as e:

View File

@ -223,6 +223,30 @@ env.AddMethod(injectThirdParty, 'InjectThirdParty')
env = env.Clone()
# Construct an empty object file that we can use to produce the
# library for every shim. This avoids the need to create and name a
# different empty source file for every third-party library, as we did
# in the past.
empty_source=env.Textfile(
target='third_party_shim.cpp',
source=str(),
)
env.Alias('generated-sources', empty_source)
empty_object = env.LibraryObject(
target='third_party_shim',
source=empty_source,
)
def shim_library(env, name, **kwargs):
return env.Library(
target=f"shim_{name}",
source=empty_object[0],
**kwargs,
)
env.AddMethod(shim_library, 'ShimLibrary')
murmurEnv = env.Clone()
murmurEnv.InjectThirdParty(libraries=['fmt'])
murmurEnv.SConscript('murmurhash3/SConscript', exports={ 'env' : murmurEnv })

View File

@ -1,3 +0,0 @@
// This file intentionally blank. shim_abseil.cpp is part of the
// third_party/abseil-cpp library, which is just a placeholder for forwarding
// library dependencies.

View File

@ -1,2 +0,0 @@
// This file intentionally blank. shim_allocator.cpp is part of the third_party/shim_allocator
// library, used to manage memory allocator selection (tcmalloc, libc, etc.).

View File

@ -1,3 +0,0 @@
// This file intentionally blank. shim_asio.cpp is part of the
// third_party/asio library, which is just a placeholder for forwarding
// library dependencies.

View File

@ -1,3 +0,0 @@
// This file intentionally blank. shim_benchmark.cpp is part of the
// third_party/benchmark library, which is just a placeholder for forwarding
// library dependencies.

View File

@ -1,3 +0,0 @@
// This file intentionally blank. shim_boost.cpp is part of the
// third_party/boost library, which is just a placeholder for forwarding
// library dependencies.

View File

@ -1,3 +0,0 @@
// This file intentionally blank. shim_fmt.cpp is part of the
// third_party/fmt library, which is just a placeholder for forwarding
// library dependencies.

View File

@ -1,2 +0,0 @@
// This file intentionally blank. shim_icu.cpp is part of the third_party/icu library, which is
// just a placeholder for forwarding library dependencies.

View File

@ -1,3 +0,0 @@
// This file intentionally blank. shim_intel_decimal128.cpp is part of the
// third_party/IntelRDFPMathLib20U1 library, which is just a placeholder for forwarding
// library dependencies.

View File

@ -1,3 +0,0 @@
// This file intentionally blank. shim_kms_message.cpp is part of the
// third_party/kms_message library, which is just a placeholder for forwarding
// library dependencies.

View File

@ -1,3 +0,0 @@
// This file intentionally blank. shim_mozjs.cpp is part of the
// third_party/mozjs library, which is just a placeholder for forwarding
// library dependencies.

View File

@ -1,3 +0,0 @@
// This file intentionally blank. shim_pcrecpp.cc is part of the
// third_party/pcrecpp library, which is just a placeholder for forwarding
// library dependencies.

View File

@ -1,3 +0,0 @@
// This file intentionally blank. shim_snappy.cpp is part of the
// third_party/snappy library, which is just a placeholder for forwarding
// library dependencies.

View File

@ -1,3 +0,0 @@
// This file intentionally blank. shim_stemmer.cpp is part of the
// third_party/libstemmer_c library, which is just a placeholder for forwarding
// library dependencies.

View File

@ -1,3 +0,0 @@
// This file intentionally blank. shim_timelib.cpp is part of the
// third_party/timelib library, which is just a placeholder for forwarding
// library dependencies.

View File

@ -1,3 +0,0 @@
// This file intentionally blank. shim_tomcrypt.cpp is part of the
// third_party/tomcrypt library, which is just a placeholder for forwarding
// library dependencies.

View File

@ -1,3 +0,0 @@
// This file intentionally blank. shim_unwind.cpp is part of the
// third_party/unwind library, which is just a placeholder for forwarding
// library dependencies.

View File

@ -1,3 +0,0 @@
// This file intentionally blank. shim_v8.cpp is part of the
// third_party/v8 library, which is just a placeholder for forwarding
// library dependencies.

View File

@ -1,3 +0,0 @@
// This file intentionally blank. shim_wiredtiger.cpp is part of the
// third_party/wiredtiger library, which is just a placeholder for forwarding
// library dependencies.

View File

@ -1,3 +0,0 @@
// This file intentionally blank. shim_yaml.cpp is part of the
// third_party/yaml library, which is just a placeholder for forwarding
// library dependencies.

View File

@ -1,3 +0,0 @@
// This file intentionally blank. shim_zlib.cpp is part of the
// third_party/zlib library, which is just a placeholder for forwarding
// library dependencies.

View File

@ -1,3 +0,0 @@
// This file intentionally blank. shim_zstd.cpp is part of the
// third_party/zstandard library, which is just a placeholder for forwarding
// library dependencies.