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:
parent
1b8d8f798c
commit
0c1e060e7e
18
SConstruct
18
SConstruct
@ -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))
|
||||
|
@ -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:
|
||||
|
24
src/third_party/SConscript
vendored
24
src/third_party/SConscript
vendored
@ -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 })
|
||||
|
3
src/third_party/shim_abseil.cpp
vendored
3
src/third_party/shim_abseil.cpp
vendored
@ -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.
|
2
src/third_party/shim_allocator.cpp
vendored
2
src/third_party/shim_allocator.cpp
vendored
@ -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.).
|
3
src/third_party/shim_asio.cpp
vendored
3
src/third_party/shim_asio.cpp
vendored
@ -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.
|
3
src/third_party/shim_benchmark.cpp
vendored
3
src/third_party/shim_benchmark.cpp
vendored
@ -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.
|
3
src/third_party/shim_boost.cpp
vendored
3
src/third_party/shim_boost.cpp
vendored
@ -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.
|
3
src/third_party/shim_fmt.cpp
vendored
3
src/third_party/shim_fmt.cpp
vendored
@ -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.
|
2
src/third_party/shim_icu.cpp
vendored
2
src/third_party/shim_icu.cpp
vendored
@ -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.
|
3
src/third_party/shim_intel_decimal128.cpp
vendored
3
src/third_party/shim_intel_decimal128.cpp
vendored
@ -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.
|
3
src/third_party/shim_kms_message.cpp
vendored
3
src/third_party/shim_kms_message.cpp
vendored
@ -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.
|
3
src/third_party/shim_mozjs.cpp
vendored
3
src/third_party/shim_mozjs.cpp
vendored
@ -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.
|
3
src/third_party/shim_pcrecpp.cpp
vendored
3
src/third_party/shim_pcrecpp.cpp
vendored
@ -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.
|
3
src/third_party/shim_snappy.cpp
vendored
3
src/third_party/shim_snappy.cpp
vendored
@ -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.
|
3
src/third_party/shim_stemmer.cpp
vendored
3
src/third_party/shim_stemmer.cpp
vendored
@ -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.
|
3
src/third_party/shim_timelib.cpp
vendored
3
src/third_party/shim_timelib.cpp
vendored
@ -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.
|
3
src/third_party/shim_tomcrypt.cpp
vendored
3
src/third_party/shim_tomcrypt.cpp
vendored
@ -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.
|
3
src/third_party/shim_unwind.cpp
vendored
3
src/third_party/shim_unwind.cpp
vendored
@ -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.
|
3
src/third_party/shim_v8.cpp
vendored
3
src/third_party/shim_v8.cpp
vendored
@ -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.
|
3
src/third_party/shim_wiredtiger.cpp
vendored
3
src/third_party/shim_wiredtiger.cpp
vendored
@ -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.
|
3
src/third_party/shim_yaml.cpp
vendored
3
src/third_party/shim_yaml.cpp
vendored
@ -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.
|
3
src/third_party/shim_zlib.cpp
vendored
3
src/third_party/shim_zlib.cpp
vendored
@ -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.
|
3
src/third_party/shim_zstd.cpp
vendored
3
src/third_party/shim_zstd.cpp
vendored
@ -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.
|
Loading…
Reference in New Issue
Block a user