SCons updates to support variant directories.
This patch is a reorganization of our build files, which brings them slightly
closer in line with standard SCons organization.
In particular, the SConstruct file sets up the various "build environment"
objects, by examining the local system and command line parameters. Then, it
delegates to some SConscript files, which describe build rules, like how to
compile "mongod" from source.
Typically, you would create several SConscript files for a project this large,
after breaking the project into logical sub projects, such as "platform
abstraction", "data manager", "query optimizer", etc. That will be future work.
For now, we only separate out the special rules for executing smoke tests into
SConscript.smoke. Pretty much all other build rules are in src/mongo/SConscript.
"tools" are placed in site_scons/site_tools.
This patch also includes better support for building and tracking dependencies
among static libraries ("libdeps" and "MergeLibrary"), and some incumbent, minor
restructuring.
This patch introduces a "warning" message from SCons about framework.o having
two rules that generate it. It is harmless, for now, and will be removed in
future work.
Future work also includes eliminating use of the SCons "Glob" utility, and
restructuring the source code into sensible components.
2012-01-04 11:30:29 -08:00
|
|
|
# -*- mode: python -*-
|
|
|
|
|
|
2020-02-21 08:04:47 -05:00
|
|
|
import SCons
|
|
|
|
|
|
2020-08-27 06:03:22 +00:00
|
|
|
from site_scons.mongo import insort_wrapper
|
2017-04-02 18:10:24 -04:00
|
|
|
import libdeps
|
2019-07-15 12:47:19 -04:00
|
|
|
import json
|
2017-04-02 18:10:24 -04:00
|
|
|
|
2016-03-31 15:09:29 -04:00
|
|
|
Import("env use_system_version_of_library usemozjs get_option")
|
2019-05-30 15:15:08 -04:00
|
|
|
Import("use_libunwind")
|
|
|
|
|
Import("use_system_libunwind")
|
|
|
|
|
Import("use_vendored_libunwind")
|
|
|
|
|
Import("wiredtiger")
|
SCons updates to support variant directories.
This patch is a reorganization of our build files, which brings them slightly
closer in line with standard SCons organization.
In particular, the SConstruct file sets up the various "build environment"
objects, by examining the local system and command line parameters. Then, it
delegates to some SConscript files, which describe build rules, like how to
compile "mongod" from source.
Typically, you would create several SConscript files for a project this large,
after breaking the project into logical sub projects, such as "platform
abstraction", "data manager", "query optimizer", etc. That will be future work.
For now, we only separate out the special rules for executing smoke tests into
SConscript.smoke. Pretty much all other build rules are in src/mongo/SConscript.
"tools" are placed in site_scons/site_tools.
This patch also includes better support for building and tracking dependencies
among static libraries ("libdeps" and "MergeLibrary"), and some incumbent, minor
restructuring.
This patch introduces a "warning" message from SCons about framework.o having
two rules that generate it. It is harmless, for now, and will be removed in
future work.
Future work also includes eliminating use of the SCons "Glob" utility, and
restructuring the source code into sensible components.
2012-01-04 11:30:29 -08:00
|
|
|
|
2019-05-20 15:16:27 -04:00
|
|
|
boostSuffix = "-1.70.0"
|
2018-12-07 14:15:08 -05:00
|
|
|
snappySuffix = '-1.1.7'
|
2018-04-11 15:38:54 -04:00
|
|
|
zlibSuffix = '-1.2.11'
|
2020-05-14 10:31:07 -07:00
|
|
|
zstdSuffix = '-1.4.4'
|
2018-12-06 13:45:18 -05:00
|
|
|
pcreSuffix = "-8.42"
|
2019-01-30 16:35:10 +00:00
|
|
|
mozjsSuffix = '-60'
|
2018-11-07 11:55:44 -05:00
|
|
|
yamlSuffix = '-0.6.2'
|
2016-03-30 11:19:11 -04:00
|
|
|
icuSuffix = '-57.1'
|
2020-06-29 13:13:36 +00:00
|
|
|
timelibSuffix = '-2018.01'
|
2018-12-20 12:24:19 -05:00
|
|
|
tomcryptSuffix = '-1.18.2'
|
2020-06-18 10:51:32 -07:00
|
|
|
variantSuffix = '-1.4.0'
|
2014-10-28 12:08:02 -04:00
|
|
|
|
2019-01-30 16:52:07 -05:00
|
|
|
thirdPartyEnvironmentModifications = {
|
2019-03-28 16:11:06 -04:00
|
|
|
'fmt' : {
|
|
|
|
|
'CPPPATH' : ['#src/third_party/fmt/dist/include'],
|
|
|
|
|
},
|
2019-01-30 16:52:07 -05:00
|
|
|
's2' : {
|
|
|
|
|
'CPPPATH' : ['#src/third_party/s2'],
|
|
|
|
|
},
|
2019-05-21 23:26:25 -04:00
|
|
|
'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)],
|
|
|
|
|
},
|
2019-01-30 16:52:07 -05:00
|
|
|
'timelib' : {
|
|
|
|
|
'CPPPATH' : ['#/src/third_party/timelib' + timelibSuffix],
|
2019-07-15 12:47:19 -04:00
|
|
|
},
|
|
|
|
|
'unwind' : {
|
|
|
|
|
},
|
2020-06-18 10:51:32 -07:00
|
|
|
'variant' : {
|
|
|
|
|
'CPPPATH' : ['#src/third_party/variant' + variantSuffix + '/include'],
|
|
|
|
|
},
|
2019-01-30 16:52:07 -05:00
|
|
|
}
|
2014-08-22 15:37:54 -04:00
|
|
|
|
2019-03-19 15:53:29 -04:00
|
|
|
def injectMozJS(thisEnv):
|
|
|
|
|
thisEnv.InjectThirdParty(libraries=['mozjs'])
|
|
|
|
|
|
|
|
|
|
if thisEnv.TargetOSIs('windows'):
|
|
|
|
|
thisEnv.Append(
|
|
|
|
|
CCFLAGS=[
|
|
|
|
|
'/FI', 'js-config.h',
|
|
|
|
|
'/FI', 'js/RequiredDefines.h',
|
|
|
|
|
],
|
|
|
|
|
CPPDEFINES=[
|
|
|
|
|
'_SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING',
|
|
|
|
|
]
|
|
|
|
|
)
|
|
|
|
|
else:
|
|
|
|
|
thisEnv.Append(
|
|
|
|
|
CCFLAGS=[
|
|
|
|
|
'-include', 'js-config.h',
|
|
|
|
|
'-include', 'js/RequiredDefines.h',
|
|
|
|
|
],
|
|
|
|
|
CXXFLAGS=[
|
|
|
|
|
'-Wno-non-virtual-dtor',
|
2019-05-06 16:29:45 -04:00
|
|
|
'-Wno-invalid-offsetof',
|
2019-03-19 15:53:29 -04:00
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
thisEnv.Prepend(CPPDEFINES=[
|
|
|
|
|
'JS_USE_CUSTOM_ALLOCATOR',
|
|
|
|
|
'STATIC_JS_API=1',
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
if get_option('spider-monkey-dbg') == "on":
|
|
|
|
|
thisEnv.Prepend(CPPDEFINES=[
|
|
|
|
|
'DEBUG',
|
|
|
|
|
'JS_DEBUG',
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
env.AddMethod(injectMozJS, 'InjectMozJS');
|
|
|
|
|
|
2014-08-22 15:37:54 -04:00
|
|
|
if not use_system_version_of_library('tcmalloc'):
|
2019-04-09 12:39:25 -04:00
|
|
|
# GPerftools does this slightly differently than the others.
|
|
|
|
|
thirdPartyEnvironmentModifications['gperftools'] = {}
|
2014-08-22 15:37:54 -04:00
|
|
|
|
|
|
|
|
if not use_system_version_of_library('pcre'):
|
2019-01-30 16:52:07 -05:00
|
|
|
thirdPartyEnvironmentModifications['pcre'] = {
|
|
|
|
|
'CPPPATH' : ['#/src/third_party/pcre' + pcreSuffix],
|
|
|
|
|
}
|
2014-08-22 15:37:54 -04:00
|
|
|
|
|
|
|
|
if not use_system_version_of_library('boost'):
|
2019-01-30 16:52:07 -05:00
|
|
|
thirdPartyEnvironmentModifications['boost'] = {
|
|
|
|
|
'CPPPATH' : ['#/src/third_party/boost' + boostSuffix],
|
|
|
|
|
}
|
2014-08-22 15:37:54 -04:00
|
|
|
|
2018-11-13 10:50:32 -05:00
|
|
|
if not use_system_version_of_library('abseil-cpp'):
|
2019-01-30 16:52:07 -05:00
|
|
|
thirdPartyEnvironmentModifications['abseil-cpp'] = {
|
|
|
|
|
'CPPPATH' : ['#/src/third_party/abseil-cpp-master/abseil-cpp'],
|
|
|
|
|
}
|
2018-11-13 10:50:32 -05:00
|
|
|
|
2014-08-22 15:37:54 -04:00
|
|
|
if not use_system_version_of_library('snappy'):
|
2019-01-30 16:52:07 -05:00
|
|
|
thirdPartyEnvironmentModifications['snappy'] = {
|
|
|
|
|
'CPPPATH' : ['#/src/third_party/snappy' + snappySuffix],
|
|
|
|
|
}
|
2014-08-22 15:37:54 -04:00
|
|
|
|
2015-11-09 13:19:23 -05:00
|
|
|
# Valgrind is a header only include as valgrind.h includes everything we need
|
|
|
|
|
if not use_system_version_of_library('valgrind'):
|
2019-01-30 16:52:07 -05:00
|
|
|
thirdPartyEnvironmentModifications['valgrind'] = {
|
|
|
|
|
'CPPPATH' : ['#/src/third_party/valgrind-3.14.0/include'],
|
|
|
|
|
}
|
2015-11-09 13:19:23 -05:00
|
|
|
|
2014-11-03 17:15:00 -05:00
|
|
|
if not use_system_version_of_library('zlib'):
|
2019-01-30 16:52:07 -05:00
|
|
|
thirdPartyEnvironmentModifications['zlib'] = {
|
|
|
|
|
'CPPPATH' : ['#/src/third_party/zlib' + zlibSuffix],
|
|
|
|
|
}
|
2014-11-03 17:15:00 -05:00
|
|
|
|
2018-12-05 14:11:38 -05:00
|
|
|
if not use_system_version_of_library('zstd'):
|
2019-01-30 16:52:07 -05:00
|
|
|
thirdPartyEnvironmentModifications['zstd'] = {
|
|
|
|
|
'CPPPATH' : ['#/src/third_party/zstandard' + zstdSuffix + '/zstd/lib'],
|
|
|
|
|
}
|
2018-12-05 14:11:38 -05:00
|
|
|
|
2018-01-27 11:37:24 -05:00
|
|
|
if not use_system_version_of_library('google-benchmark'):
|
2019-01-30 16:52:07 -05:00
|
|
|
thirdPartyEnvironmentModifications['benchmark'] = {
|
2020-05-04 04:52:56 -04:00
|
|
|
'CPPPATH' : ['#/src/third_party/benchmark/dist/include'],
|
2019-01-30 16:52:07 -05:00
|
|
|
}
|
2018-01-27 11:37:24 -05:00
|
|
|
|
2015-07-09 14:05:20 -04:00
|
|
|
# TODO: figure out if we want to offer system versions of mozjs. Mozilla
|
|
|
|
|
# hasn't offered a source tarball since 24, but in theory they could.
|
|
|
|
|
#
|
|
|
|
|
#if not use_system_version_of_library('mozjs'):
|
|
|
|
|
if True:
|
2019-01-30 16:52:07 -05:00
|
|
|
thirdPartyEnvironmentModifications['mozjs'] = {
|
|
|
|
|
'CPPPATH' : [
|
|
|
|
|
'#/src/third_party/mozjs' + mozjsSuffix + '/include',
|
|
|
|
|
'#/src/third_party/mozjs' + mozjsSuffix + '/mongo_sources',
|
|
|
|
|
'#/src/third_party/mozjs' + mozjsSuffix + '/platform/' + env["TARGET_ARCH"] + "/" + env["TARGET_OS"] + "/include",
|
|
|
|
|
],
|
|
|
|
|
}
|
2015-07-09 14:05:20 -04:00
|
|
|
|
2017-07-18 16:13:32 -04:00
|
|
|
if "tom" in env["MONGO_CRYPTO"]:
|
2019-01-30 16:52:07 -05:00
|
|
|
thirdPartyEnvironmentModifications['tomcrypt'] = {
|
|
|
|
|
'CPPPATH' : ['#/src/third_party/tomcrypt' + tomcryptSuffix + '/src/headers'],
|
|
|
|
|
}
|
2017-07-18 16:13:32 -04:00
|
|
|
|
2014-08-22 15:37:54 -04:00
|
|
|
if not use_system_version_of_library('stemmer'):
|
2019-01-30 16:52:07 -05:00
|
|
|
thirdPartyEnvironmentModifications['stemmer'] = {
|
|
|
|
|
'CPPPATH' : ['#/src/third_party/libstemmer_c/include'],
|
|
|
|
|
}
|
2014-08-22 15:37:54 -04:00
|
|
|
|
2015-06-16 17:33:46 -04:00
|
|
|
# Note that the wiredtiger.h header is generated, so
|
2014-11-04 15:47:12 -05:00
|
|
|
# we want to look for it in the build directory not
|
|
|
|
|
# the source directory.
|
|
|
|
|
if wiredtiger and not use_system_version_of_library('wiredtiger'):
|
2019-01-30 16:52:07 -05:00
|
|
|
thirdPartyEnvironmentModifications['wiredtiger'] = {
|
|
|
|
|
'CPPPATH' : ['$BUILD_DIR/third_party/wiredtiger'],
|
|
|
|
|
}
|
2014-11-04 15:47:12 -05:00
|
|
|
|
2014-08-22 15:37:54 -04:00
|
|
|
if not use_system_version_of_library('yaml'):
|
2019-01-30 16:52:07 -05:00
|
|
|
thirdPartyEnvironmentModifications['yaml'] = {
|
2020-05-15 20:26:18 -07:00
|
|
|
'CPPPATH' : ['#/src/third_party/yaml-cpp' + yamlSuffix + '/yaml-cpp/include'],
|
2019-01-30 16:52:07 -05:00
|
|
|
'CPPDEFINES' : ['_SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING'] if env.ToolchainIs('msvc') else [],
|
|
|
|
|
}
|
2014-04-23 12:08:55 -04:00
|
|
|
|
2015-05-20 16:08:15 -04:00
|
|
|
if not use_system_version_of_library('asio'):
|
2019-01-30 16:52:07 -05:00
|
|
|
thirdPartyEnvironmentModifications['asio'] = {
|
|
|
|
|
'CPPPATH' : ['#/src/third_party/asio-master/asio/include'],
|
|
|
|
|
}
|
2015-05-20 16:08:15 -04:00
|
|
|
|
2015-07-27 13:53:21 -04:00
|
|
|
if not use_system_version_of_library('intel_decimal128'):
|
2019-01-30 16:52:07 -05:00
|
|
|
thirdPartyEnvironmentModifications['intel_decimal128'] = {
|
|
|
|
|
'CPPPATH' : ['#/src/third_party/IntelRDFPMathLib20U1/LIBRARY'],
|
|
|
|
|
}
|
2015-07-27 13:53:21 -04:00
|
|
|
|
2016-05-17 12:11:27 -04:00
|
|
|
if not use_system_version_of_library('icu'):
|
2019-01-30 16:52:07 -05:00
|
|
|
thirdPartyEnvironmentModifications['icu'] = {
|
|
|
|
|
'CPPPATH' : ['#/src/third_party/icu4c' + icuSuffix + '/source/common',
|
|
|
|
|
'#/src/third_party/icu4c' + icuSuffix + '/source/i18n'],
|
|
|
|
|
}
|
|
|
|
|
|
2019-03-14 13:38:03 -04:00
|
|
|
if not use_system_version_of_library('kms-message'):
|
|
|
|
|
thirdPartyEnvironmentModifications['kms-message'] = {
|
|
|
|
|
'CPPPATH' : ['#/src/third_party/kms-message/src'],
|
|
|
|
|
'CPPDEFINES' :['KMS_MSG_STATIC']
|
|
|
|
|
}
|
|
|
|
|
|
2019-05-30 15:15:08 -04:00
|
|
|
if use_system_libunwind:
|
|
|
|
|
thirdPartyEnvironmentModifications['unwind'] = {
|
2020-08-26 15:35:24 +00:00
|
|
|
'SYSLIBDEPS_PRIVATE' : [env['LIBDEPS_UNWIND_SYSLIBDEP'], 'lzma'],
|
2019-05-30 15:15:08 -04:00
|
|
|
}
|
|
|
|
|
elif use_vendored_libunwind:
|
|
|
|
|
thirdPartyEnvironmentModifications['unwind'] = {
|
2020-08-26 15:35:24 +00:00
|
|
|
'SYSLIBDEPS_PRIVATE' : ['lzma'],
|
2019-05-30 15:15:08 -04:00
|
|
|
}
|
|
|
|
|
|
2019-01-30 16:52:07 -05:00
|
|
|
def injectThirdParty(thisEnv, libraries=[], parts=[]):
|
|
|
|
|
libraries = thisEnv.Flatten([libraries])
|
|
|
|
|
parts = thisEnv.Flatten([parts])
|
|
|
|
|
for lib in libraries:
|
2019-08-14 18:30:34 +00:00
|
|
|
mods = thirdPartyEnvironmentModifications.get(lib, None)
|
|
|
|
|
if mods is None:
|
|
|
|
|
continue
|
2019-01-30 16:52:07 -05:00
|
|
|
if not parts:
|
2019-03-11 13:12:51 -04:00
|
|
|
thisEnv.PrependUnique(**mods)
|
2019-01-30 16:52:07 -05:00
|
|
|
else:
|
|
|
|
|
for part in parts:
|
2019-03-11 13:12:51 -04:00
|
|
|
thisEnv.PrependUnique({part : mods[part]})
|
2019-01-30 16:52:07 -05:00
|
|
|
|
|
|
|
|
env.AddMethod(injectThirdParty, 'InjectThirdParty')
|
2014-04-23 12:08:55 -04:00
|
|
|
|
2020-05-20 18:14:13 -04:00
|
|
|
for builder_name in ('Program', 'SharedLibrary', 'LoadableModule', 'StaticLibrary'):
|
|
|
|
|
builder = env['BUILDERS'][builder_name]
|
|
|
|
|
base_emitter = builder.emitter
|
2020-02-21 08:04:47 -05:00
|
|
|
|
2020-05-20 18:14:13 -04:00
|
|
|
def add_shim_allocator_hack(target, source, env):
|
|
|
|
|
|
|
|
|
|
# If we allowed conftests to become dependent, any TryLink
|
|
|
|
|
# that happened after we made the below modifications would
|
|
|
|
|
# cause the configure steps to try to compile tcmalloc and any
|
|
|
|
|
# of its dependencies. Oops!
|
|
|
|
|
if any('conftest' in str(t) for t in target):
|
2020-02-21 08:04:47 -05:00
|
|
|
return target, source
|
|
|
|
|
|
2020-05-20 18:14:13 -04:00
|
|
|
# It is possible that 'env' isn't a unique
|
|
|
|
|
# OverrideEnvironment, since if you didn't pass any kw args
|
|
|
|
|
# into your builder call, you just reuse the env you were
|
|
|
|
|
# called with. That could mean that we see the same
|
2020-07-23 21:39:20 +00:00
|
|
|
# environment here multiple times. But that is really OK,
|
2020-05-20 18:14:13 -04:00
|
|
|
# since the operation we are performing would be performed on
|
|
|
|
|
# all of them anyway. The flag serves as a way to disable the
|
|
|
|
|
# auto-injection for the handful of libraries where we must do
|
|
|
|
|
# so to avoid forming a cycle.
|
|
|
|
|
if not env.get('DISABLE_ALLOCATOR_SHIM_INJECTION', False):
|
|
|
|
|
lds = env.get('LIBDEPS', [])
|
2020-07-23 21:39:20 +00:00
|
|
|
shim_allocator = '$BUILD_DIR/third_party/shim_allocator'
|
|
|
|
|
if shim_allocator not in lds:
|
2020-08-27 06:03:22 +00:00
|
|
|
insort_wrapper(lds, shim_allocator)
|
2020-07-23 21:39:20 +00:00
|
|
|
env['LIBDEPS'] = lds
|
2020-05-20 18:14:13 -04:00
|
|
|
|
|
|
|
|
return target, source
|
|
|
|
|
|
|
|
|
|
builder.emitter = SCons.Builder.ListEmitter([add_shim_allocator_hack, base_emitter])
|
2020-02-21 08:04:47 -05:00
|
|
|
|
2016-12-21 18:48:56 -05:00
|
|
|
env = env.Clone()
|
2014-04-23 12:08:55 -04:00
|
|
|
|
|
|
|
|
murmurEnv = env.Clone()
|
2019-04-01 13:07:09 -04:00
|
|
|
murmurEnv.InjectThirdParty(libraries=['fmt'])
|
2014-04-23 12:08:55 -04:00
|
|
|
murmurEnv.SConscript('murmurhash3/SConscript', exports={ 'env' : murmurEnv })
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
s2Env = env.Clone()
|
2020-06-18 10:51:32 -07:00
|
|
|
s2Env.InjectThirdParty(libraries=[
|
|
|
|
|
's2',
|
|
|
|
|
'boost',
|
|
|
|
|
'abseil-cpp',
|
|
|
|
|
'fmt',
|
|
|
|
|
'safeint',
|
|
|
|
|
'variant',
|
|
|
|
|
])
|
2014-04-23 12:08:55 -04:00
|
|
|
s2Env.InjectMongoIncludePaths()
|
|
|
|
|
s2Env.SConscript('s2/SConscript', exports={'env' : s2Env})
|
|
|
|
|
|
2019-05-30 15:15:08 -04:00
|
|
|
if use_libunwind:
|
|
|
|
|
if use_system_libunwind:
|
|
|
|
|
unwindEnv = env.Clone(
|
|
|
|
|
SYSLIBDEPS=[
|
|
|
|
|
env['LIBDEPS_UNWIND_SYSLIBDEP'],
|
|
|
|
|
])
|
|
|
|
|
else:
|
|
|
|
|
unwindEnv = env.Clone()
|
|
|
|
|
|
|
|
|
|
# SCons uses the "$CC" tool for both C and assembler files. Distinguish them for the sake of
|
|
|
|
|
# later tools like our Ninja SCons module.
|
|
|
|
|
unwindEnv['ASPP'] = '$CC'
|
|
|
|
|
unwindEnv['ASPPCOM'] = unwindEnv['ASPPCOM'].replace('$CC ', '$ASPP ')
|
|
|
|
|
|
|
|
|
|
def registerConsumerModifications(env, **kwargs):
|
|
|
|
|
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.Library(
|
|
|
|
|
target="shim_unwind",
|
|
|
|
|
source=[
|
|
|
|
|
'shim_unwind.cpp',
|
2020-02-21 08:04:47 -05:00
|
|
|
],
|
|
|
|
|
# We don't want the shim_allocator hack to apply to this library, since
|
|
|
|
|
# otherwise we would create a loop, since tcmalloc might use us. That should
|
|
|
|
|
# be OK, unless libunwind had static initializers that invoked malloc.
|
|
|
|
|
DISABLE_ALLOCATOR_SHIM_INJECTION=True,
|
|
|
|
|
)
|
2019-07-15 12:47:19 -04:00
|
|
|
|
2019-04-01 13:07:09 -04:00
|
|
|
if use_system_version_of_library("fmt"):
|
|
|
|
|
fmtEnv = env.Clone(
|
|
|
|
|
SYSLIBDEPS=[
|
|
|
|
|
env['LIBDEPS_FMT_SYSLIBDEP'],
|
|
|
|
|
])
|
|
|
|
|
else:
|
|
|
|
|
fmtEnv = env.Clone()
|
|
|
|
|
fmtEnv.InjectThirdParty(libraries=['fmt'])
|
|
|
|
|
fmtEnv.InjectMongoIncludePaths()
|
|
|
|
|
fmtEnv.SConscript('fmt/SConscript', exports={'env' : fmtEnv})
|
|
|
|
|
fmtEnv = fmtEnv.Clone(
|
|
|
|
|
LIBDEPS_INTERFACE=[
|
|
|
|
|
'fmt/fmt',
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
fmtEnv.Library(
|
|
|
|
|
target="shim_fmt",
|
|
|
|
|
source=[
|
|
|
|
|
'shim_fmt.cpp',
|
|
|
|
|
])
|
|
|
|
|
|
SCons updates to support variant directories.
This patch is a reorganization of our build files, which brings them slightly
closer in line with standard SCons organization.
In particular, the SConstruct file sets up the various "build environment"
objects, by examining the local system and command line parameters. Then, it
delegates to some SConscript files, which describe build rules, like how to
compile "mongod" from source.
Typically, you would create several SConscript files for a project this large,
after breaking the project into logical sub projects, such as "platform
abstraction", "data manager", "query optimizer", etc. That will be future work.
For now, we only separate out the special rules for executing smoke tests into
SConscript.smoke. Pretty much all other build rules are in src/mongo/SConscript.
"tools" are placed in site_scons/site_tools.
This patch also includes better support for building and tracking dependencies
among static libraries ("libdeps" and "MergeLibrary"), and some incumbent, minor
restructuring.
This patch introduces a "warning" message from SCons about framework.o having
two rules that generate it. It is harmless, for now, and will be removed in
future work.
Future work also includes eliminating use of the SCons "Glob" utility, and
restructuring the source code into sensible components.
2012-01-04 11:30:29 -08:00
|
|
|
|
2012-03-24 10:26:41 -04:00
|
|
|
if use_system_version_of_library("pcre"):
|
2014-04-23 12:08:55 -04:00
|
|
|
pcreEnv = env.Clone(
|
|
|
|
|
SYSLIBDEPS=[
|
|
|
|
|
env['LIBDEPS_PCRE_SYSLIBDEP'],
|
|
|
|
|
env['LIBDEPS_PCRECPP_SYSLIBDEP'],
|
|
|
|
|
])
|
SCons updates to support variant directories.
This patch is a reorganization of our build files, which brings them slightly
closer in line with standard SCons organization.
In particular, the SConstruct file sets up the various "build environment"
objects, by examining the local system and command line parameters. Then, it
delegates to some SConscript files, which describe build rules, like how to
compile "mongod" from source.
Typically, you would create several SConscript files for a project this large,
after breaking the project into logical sub projects, such as "platform
abstraction", "data manager", "query optimizer", etc. That will be future work.
For now, we only separate out the special rules for executing smoke tests into
SConscript.smoke. Pretty much all other build rules are in src/mongo/SConscript.
"tools" are placed in site_scons/site_tools.
This patch also includes better support for building and tracking dependencies
among static libraries ("libdeps" and "MergeLibrary"), and some incumbent, minor
restructuring.
This patch introduces a "warning" message from SCons about framework.o having
two rules that generate it. It is harmless, for now, and will be removed in
future work.
Future work also includes eliminating use of the SCons "Glob" utility, and
restructuring the source code into sensible components.
2012-01-04 11:30:29 -08:00
|
|
|
else:
|
2014-04-23 12:08:55 -04:00
|
|
|
pcreEnv = env.Clone()
|
2019-01-30 16:52:07 -05:00
|
|
|
pcreEnv.InjectThirdParty(libraries=['pcre'])
|
2015-04-03 15:26:11 -04:00
|
|
|
pcreEnv.SConscript('pcre' + pcreSuffix + '/SConscript', exports={ 'env' : pcreEnv })
|
2014-04-23 12:08:55 -04:00
|
|
|
pcreEnv = pcreEnv.Clone(
|
2017-07-07 11:45:50 -04:00
|
|
|
LIBDEPS_INTERFACE=[
|
|
|
|
|
'pcre' + pcreSuffix + '/pcrecpp',
|
2014-04-23 12:08:55 -04:00
|
|
|
])
|
|
|
|
|
|
|
|
|
|
pcreEnv.Library(
|
|
|
|
|
target="shim_pcrecpp",
|
|
|
|
|
source=[
|
|
|
|
|
'shim_pcrecpp.cc',
|
|
|
|
|
])
|
2012-03-02 11:13:09 -05:00
|
|
|
|
2014-04-23 12:08:55 -04:00
|
|
|
|
|
|
|
|
boostEnv = env
|
2012-03-24 10:26:41 -04:00
|
|
|
if use_system_version_of_library("boost"):
|
2014-04-23 12:08:55 -04:00
|
|
|
# On windows, we don't need the syslibdeps because autolib will select the right libraries
|
|
|
|
|
# for us automatically.
|
2015-03-30 12:14:42 -04:00
|
|
|
if not env.TargetOSIs('windows'):
|
2014-04-23 12:08:55 -04:00
|
|
|
boostEnv = env.Clone(
|
|
|
|
|
SYSLIBDEPS=[
|
|
|
|
|
env['LIBDEPS_BOOST_PROGRAM_OPTIONS_SYSLIBDEP'],
|
|
|
|
|
env['LIBDEPS_BOOST_FILESYSTEM_SYSLIBDEP'],
|
|
|
|
|
env['LIBDEPS_BOOST_SYSTEM_SYSLIBDEP'],
|
2016-07-21 15:49:59 -04:00
|
|
|
env['LIBDEPS_BOOST_IOSTREAMS_SYSLIBDEP'],
|
2019-06-04 09:52:11 -04:00
|
|
|
env['LIBDEPS_BOOST_THREAD_SYSLIBDEP'],
|
|
|
|
|
env['LIBDEPS_BOOST_LOG_SYSLIBDEP'],
|
2014-04-23 12:08:55 -04:00
|
|
|
])
|
2012-03-02 11:13:09 -05:00
|
|
|
else:
|
2014-06-06 08:03:24 -04:00
|
|
|
boostDirectory = 'boost' + boostSuffix
|
2014-04-23 12:08:55 -04:00
|
|
|
boostEnv = env.Clone()
|
2019-01-30 16:52:07 -05:00
|
|
|
boostEnv.InjectThirdParty(libraries=['boost'])
|
2014-04-23 12:08:55 -04:00
|
|
|
boostEnv.SConscript(boostDirectory + '/SConscript', exports={ 'env' : boostEnv })
|
|
|
|
|
boostEnv = boostEnv.Clone(
|
2017-07-07 11:45:50 -04:00
|
|
|
LIBDEPS_INTERFACE=[
|
|
|
|
|
boostDirectory + '/boost_filesystem',
|
|
|
|
|
boostDirectory + '/boost_iostreams',
|
2019-06-04 09:52:11 -04:00
|
|
|
boostDirectory + '/boost_log',
|
2020-08-27 06:03:22 +00:00
|
|
|
boostDirectory + '/boost_program_options',
|
|
|
|
|
boostDirectory + '/boost_system',
|
2014-04-23 12:08:55 -04:00
|
|
|
])
|
|
|
|
|
|
|
|
|
|
boostEnv.Library(
|
|
|
|
|
target="shim_boost",
|
|
|
|
|
source=[
|
|
|
|
|
'shim_boost.cpp',
|
|
|
|
|
])
|
|
|
|
|
|
2018-11-13 10:50:32 -05:00
|
|
|
abseilEnv = env
|
|
|
|
|
if use_system_version_of_library("abseil-cpp"):
|
|
|
|
|
abseilEnv = env.Clone(
|
|
|
|
|
SYSLIBDEPS=[
|
|
|
|
|
env['LIBDEPS_ABSL_CONTAINER_SYSLIBDEP'],
|
|
|
|
|
env['LIBDEPS_ABSL_HASH_SYSLIBDEP'],
|
|
|
|
|
])
|
|
|
|
|
else:
|
|
|
|
|
abseilDirectory = 'abseil-cpp-master'
|
|
|
|
|
abseilEnv = env.Clone()
|
2019-01-30 16:52:07 -05:00
|
|
|
abseilEnv.InjectThirdParty(libraries=['abseil-cpp'])
|
2018-11-13 10:50:32 -05:00
|
|
|
abseilEnv.SConscript(abseilDirectory + '/SConscript', exports={ 'env' : abseilEnv })
|
|
|
|
|
abseilEnv = abseilEnv.Clone(
|
|
|
|
|
LIBDEPS_INTERFACE=[
|
|
|
|
|
abseilDirectory + '/absl_container',
|
|
|
|
|
abseilDirectory + '/absl_hash',
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
abseilEnv.Library(
|
|
|
|
|
target="shim_abseil",
|
|
|
|
|
source=[
|
|
|
|
|
'shim_abseil.cpp',
|
|
|
|
|
])
|
2013-09-10 11:56:57 -04:00
|
|
|
|
2012-03-24 10:42:10 -04:00
|
|
|
if use_system_version_of_library("snappy"):
|
2014-04-23 12:08:55 -04:00
|
|
|
snappyEnv = env.Clone(
|
|
|
|
|
SYSLIBDEPS=[
|
|
|
|
|
env['LIBDEPS_SNAPPY_SYSLIBDEP'],
|
|
|
|
|
])
|
2012-03-24 10:42:10 -04:00
|
|
|
else:
|
2014-04-23 12:08:55 -04:00
|
|
|
snappyEnv = env.Clone()
|
2019-01-30 16:52:07 -05:00
|
|
|
snappyEnv.InjectThirdParty(libraries=['snappy'])
|
2014-10-28 15:53:23 -04:00
|
|
|
snappyEnv.InjectMongoIncludePaths()
|
2014-10-28 12:08:02 -04:00
|
|
|
snappyEnv.SConscript('snappy' + snappySuffix + '/SConscript', exports={ 'env' : snappyEnv })
|
2014-04-23 12:08:55 -04:00
|
|
|
snappyEnv = snappyEnv.Clone(
|
2017-07-07 11:45:50 -04:00
|
|
|
LIBDEPS_INTERFACE=[
|
|
|
|
|
'snappy' + snappySuffix + '/snappy',
|
2014-04-23 12:08:55 -04:00
|
|
|
])
|
|
|
|
|
|
|
|
|
|
snappyEnv.Library(
|
|
|
|
|
target="shim_snappy",
|
|
|
|
|
source=[
|
|
|
|
|
'shim_snappy.cpp',
|
|
|
|
|
])
|
|
|
|
|
|
2014-11-03 17:15:00 -05:00
|
|
|
if use_system_version_of_library("zlib"):
|
|
|
|
|
zlibEnv = env.Clone(
|
|
|
|
|
SYSLIBDEPS=[
|
|
|
|
|
env['LIBDEPS_ZLIB_SYSLIBDEP'],
|
|
|
|
|
])
|
|
|
|
|
else:
|
|
|
|
|
zlibEnv = env.Clone()
|
2019-01-30 16:52:07 -05:00
|
|
|
zlibEnv.InjectThirdParty(libraries=['zlib'])
|
2014-11-03 17:15:00 -05:00
|
|
|
zlibEnv.SConscript('zlib' + zlibSuffix + '/SConscript', exports={ 'env' : zlibEnv })
|
|
|
|
|
zlibEnv = zlibEnv.Clone(
|
2017-07-07 11:45:50 -04:00
|
|
|
LIBDEPS_INTERFACE=[
|
|
|
|
|
'zlib' + zlibSuffix + '/zlib',
|
2014-11-03 17:15:00 -05:00
|
|
|
])
|
|
|
|
|
|
|
|
|
|
zlibEnv.Library(
|
|
|
|
|
target="shim_zlib",
|
|
|
|
|
source=[
|
|
|
|
|
'shim_zlib.cpp',
|
|
|
|
|
])
|
2012-03-26 10:33:16 -04:00
|
|
|
|
2018-12-05 14:11:38 -05:00
|
|
|
if use_system_version_of_library("zstd"):
|
|
|
|
|
zstdEnv = env.Clone(
|
|
|
|
|
SYSLIBDEPS=[
|
|
|
|
|
env['LIBDEPS_ZSTD_SYSLIBDEP'],
|
|
|
|
|
])
|
|
|
|
|
else:
|
|
|
|
|
zstdEnv = env.Clone()
|
2019-01-30 16:52:07 -05:00
|
|
|
zstdEnv.InjectThirdParty(libraries=['zstd'])
|
2018-12-05 14:11:38 -05:00
|
|
|
zstdEnv.SConscript('zstandard' + zstdSuffix + '/SConscript', exports={ 'env' : zstdEnv })
|
|
|
|
|
zstdEnv = zstdEnv.Clone(
|
|
|
|
|
LIBDEPS_INTERFACE=[
|
|
|
|
|
'zstandard' + zstdSuffix + '/zstd',
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
zstdEnv.Library(
|
|
|
|
|
target="shim_zstd",
|
|
|
|
|
source=[
|
|
|
|
|
'shim_zstd.cpp',
|
|
|
|
|
])
|
|
|
|
|
|
2018-01-27 11:37:24 -05:00
|
|
|
if use_system_version_of_library("google-benchmark"):
|
|
|
|
|
benchmarkEnv = env.Clone(
|
|
|
|
|
SYSLIBDEPS=[
|
|
|
|
|
env['LIBDEPS_BENCHMARK_SYSLIBDEP'],
|
|
|
|
|
])
|
|
|
|
|
else:
|
|
|
|
|
benchmarkEnv = env.Clone()
|
2019-01-30 16:52:07 -05:00
|
|
|
benchmarkEnv.InjectThirdParty(libraries=['benchmark'])
|
2018-01-27 11:37:24 -05:00
|
|
|
benchmarkEnv.SConscript(
|
2020-05-04 04:52:56 -04:00
|
|
|
'benchmark/SConscript',
|
2018-01-27 11:37:24 -05:00
|
|
|
exports={ 'env' : benchmarkEnv })
|
|
|
|
|
benchmarkEnv = benchmarkEnv.Clone(
|
|
|
|
|
LIBDEPS_INTERFACE=[
|
2020-05-04 04:52:56 -04:00
|
|
|
'benchmark/benchmark',
|
2018-01-27 11:37:24 -05:00
|
|
|
])
|
|
|
|
|
|
|
|
|
|
benchmarkEnv.Library(
|
|
|
|
|
target="shim_benchmark",
|
|
|
|
|
source=[
|
|
|
|
|
'shim_benchmark.cpp',
|
|
|
|
|
])
|
|
|
|
|
|
2015-07-09 14:05:20 -04:00
|
|
|
if usemozjs:
|
|
|
|
|
mozjsEnv = env.Clone()
|
|
|
|
|
mozjsEnv.SConscript('mozjs' + mozjsSuffix + '/SConscript', exports={'env' : mozjsEnv })
|
|
|
|
|
mozjsEnv = mozjsEnv.Clone(
|
2017-07-07 11:45:50 -04:00
|
|
|
LIBDEPS_INTERFACE=[
|
|
|
|
|
'mozjs' + mozjsSuffix + '/mozjs',
|
|
|
|
|
'shim_zlib',
|
2015-07-09 14:05:20 -04:00
|
|
|
])
|
|
|
|
|
|
|
|
|
|
mozjsEnv.Library(
|
|
|
|
|
target="shim_mozjs",
|
|
|
|
|
source=[
|
|
|
|
|
'shim_mozjs.cpp',
|
|
|
|
|
])
|
2014-04-23 12:08:55 -04:00
|
|
|
|
2017-07-18 16:13:32 -04:00
|
|
|
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.Library(
|
|
|
|
|
target="shim_tomcrypt",
|
|
|
|
|
source=[
|
|
|
|
|
'shim_tomcrypt.cpp',
|
|
|
|
|
])
|
|
|
|
|
|
2014-04-23 12:08:55 -04:00
|
|
|
gperftoolsEnv = env
|
2019-03-11 13:12:51 -04:00
|
|
|
if gperftoolsEnv['MONGO_ALLOCATOR'] in ["tcmalloc", "tcmalloc-experimental"]:
|
2014-04-23 12:08:55 -04:00
|
|
|
if use_system_version_of_library("tcmalloc"):
|
|
|
|
|
gperftoolsEnv = env.Clone(
|
|
|
|
|
SYSLIBDEPS=[
|
|
|
|
|
env['LIBDEPS_TCMALLOC_SYSLIBDEP'],
|
|
|
|
|
])
|
|
|
|
|
else:
|
|
|
|
|
gperftoolsEnv = env.Clone()
|
2019-01-30 16:52:07 -05:00
|
|
|
gperftoolsEnv.InjectThirdParty(libraries=['gperftools'])
|
2019-03-11 13:12:51 -04:00
|
|
|
# Allow gperftools to determine its own consumer-side include/ dirs.
|
|
|
|
|
# Needed because those are in a platform-specific subdirectory.
|
2019-07-15 12:47:19 -04:00
|
|
|
def registerConsumerModifications(env, **kwargs):
|
|
|
|
|
for k,v in kwargs.items():
|
|
|
|
|
thirdPartyEnvironmentModifications['gperftools'][k] = v
|
|
|
|
|
gperftoolsEnv.AddMethod(registerConsumerModifications, 'RegisterConsumerModifications')
|
2019-03-11 13:12:51 -04:00
|
|
|
gperftoolsEnv.SConscript(
|
2020-08-11 22:32:52 -07:00
|
|
|
'gperftools' + '/SConscript',
|
2019-07-15 12:47:19 -04:00
|
|
|
exports={'env' : gperftoolsEnv})
|
2014-04-23 12:08:55 -04:00
|
|
|
gperftoolsEnv = gperftoolsEnv.Clone(
|
2017-07-07 11:45:50 -04:00
|
|
|
LIBDEPS_INTERFACE=[
|
2020-08-11 22:32:52 -07:00
|
|
|
'gperftools/tcmalloc_minimal',
|
2014-04-23 12:08:55 -04:00
|
|
|
])
|
|
|
|
|
|
|
|
|
|
gperftoolsEnv.Library(
|
|
|
|
|
target="shim_allocator",
|
|
|
|
|
source=[
|
|
|
|
|
"shim_allocator.cpp",
|
2020-02-21 08:04:47 -05:00
|
|
|
],
|
|
|
|
|
DISABLE_ALLOCATOR_SHIM_INJECTION=True,
|
2020-08-17 22:30:34 +00:00
|
|
|
LIBDEPS_TAGS=[
|
|
|
|
|
# The shim allocator must be linked to every node, including what would
|
|
|
|
|
# be considered a leaf node to ensure the system allocator
|
|
|
|
|
# is not linked in before tcmalloc. This tag allows nodes tagged as
|
|
|
|
|
# leaf nodes to still get the correct allocator.
|
2020-08-24 15:00:18 +00:00
|
|
|
'lint-leaf-node-allowed-dep',
|
|
|
|
|
# This tag allows the allocator to be linked to nodes marked as not
|
|
|
|
|
# allowed to have public dependencies.
|
|
|
|
|
'lint-public-dep-allowed'
|
2020-08-17 22:30:34 +00:00
|
|
|
],
|
2020-02-21 08:04:47 -05:00
|
|
|
)
|
2014-04-23 12:08:55 -04:00
|
|
|
|
2012-12-25 12:07:05 -05:00
|
|
|
|
2013-06-03 14:33:18 -04:00
|
|
|
if use_system_version_of_library("stemmer"):
|
2014-04-23 12:08:55 -04:00
|
|
|
stemmerEnv = env.Clone(
|
|
|
|
|
SYSLIBDEPS=[
|
|
|
|
|
env['LIBDEPS_STEMMER_SYSLIBDEP'],
|
|
|
|
|
])
|
2013-06-03 14:33:18 -04:00
|
|
|
else:
|
2014-04-23 12:08:55 -04:00
|
|
|
stemmerEnv = env.Clone()
|
2019-01-30 16:52:07 -05:00
|
|
|
stemmerEnv.InjectThirdParty(libraries=['stemmer'])
|
2014-04-23 12:08:55 -04:00
|
|
|
stemmerEnv.SConscript('libstemmer_c/SConscript', exports={ 'env' : stemmerEnv })
|
|
|
|
|
stemmerEnv = stemmerEnv.Clone(
|
2017-07-07 11:45:50 -04:00
|
|
|
LIBDEPS_INTERFACE=[
|
|
|
|
|
'libstemmer_c/stemmer',
|
2014-04-23 12:08:55 -04:00
|
|
|
])
|
|
|
|
|
|
|
|
|
|
stemmerEnv.Library(
|
|
|
|
|
target="shim_stemmer",
|
|
|
|
|
source=[
|
|
|
|
|
'shim_stemmer.cpp'
|
|
|
|
|
])
|
|
|
|
|
|
2013-11-09 15:38:08 -05:00
|
|
|
|
|
|
|
|
if use_system_version_of_library("yaml"):
|
2014-04-23 12:08:55 -04:00
|
|
|
yamlEnv = env.Clone(
|
|
|
|
|
SYSLIBDEPS=[
|
|
|
|
|
env['LIBDEPS_YAML_SYSLIBDEP'],
|
|
|
|
|
])
|
2013-11-09 15:38:08 -05:00
|
|
|
else:
|
2014-04-23 12:08:55 -04:00
|
|
|
yamlEnv = env.Clone()
|
2019-01-30 16:52:07 -05:00
|
|
|
yamlEnv.InjectThirdParty(libraries=['yaml', 'boost'])
|
2016-01-25 14:41:10 -05:00
|
|
|
yamlEnv.SConscript('yaml-cpp' + yamlSuffix + '/SConscript', exports={ 'env' : yamlEnv })
|
2014-04-23 12:08:55 -04:00
|
|
|
yamlEnv = yamlEnv.Clone(
|
2017-07-07 11:45:50 -04:00
|
|
|
LIBDEPS_INTERFACE=[
|
|
|
|
|
'yaml-cpp' + yamlSuffix + '/yaml',
|
2014-04-23 12:08:55 -04:00
|
|
|
])
|
|
|
|
|
|
|
|
|
|
yamlEnv.Library(
|
|
|
|
|
target="shim_yaml",
|
|
|
|
|
source=[
|
|
|
|
|
'shim_yaml.cpp',
|
|
|
|
|
])
|
2014-04-14 16:41:39 -04:00
|
|
|
|
2019-05-21 23:26:25 -04:00
|
|
|
timelibEnv = env.Clone()
|
2019-01-30 16:52:07 -05:00
|
|
|
timelibEnv.InjectThirdParty(libraries=['timelib'])
|
2017-06-06 11:48:10 -04:00
|
|
|
timelibEnv.SConscript('timelib' + timelibSuffix + '/SConscript', exports={ 'env' : timelibEnv })
|
|
|
|
|
timelibEnv = timelibEnv.Clone(
|
2017-07-07 11:45:50 -04:00
|
|
|
LIBDEPS_INTERFACE=[
|
|
|
|
|
'timelib' + timelibSuffix + '/timelib',
|
2017-06-06 11:48:10 -04:00
|
|
|
])
|
|
|
|
|
|
|
|
|
|
timelibEnv.Library(
|
|
|
|
|
target='shim_timelib',
|
|
|
|
|
source=[
|
|
|
|
|
'shim_timelib.cpp',
|
|
|
|
|
])
|
|
|
|
|
|
2014-11-04 15:47:12 -05:00
|
|
|
if wiredtiger:
|
|
|
|
|
if use_system_version_of_library("wiredtiger"):
|
|
|
|
|
wiredtigerEnv = env.Clone(
|
|
|
|
|
SYSLIBDEPS=[
|
|
|
|
|
env['LIBDEPS_WIREDTIGER_SYSLIBDEP'],
|
|
|
|
|
])
|
|
|
|
|
else:
|
|
|
|
|
wiredtigerEnv = env.Clone()
|
2019-01-30 16:52:07 -05:00
|
|
|
wiredtigerEnv.InjectThirdParty(libraries=['wiredtiger'])
|
2014-11-04 15:47:12 -05:00
|
|
|
wiredtigerEnv.SConscript('wiredtiger/SConscript', exports={ 'env' : wiredtigerEnv })
|
|
|
|
|
wiredtigerEnv = wiredtigerEnv.Clone(
|
2017-07-07 11:45:50 -04:00
|
|
|
LIBDEPS_INTERFACE=[
|
|
|
|
|
'wiredtiger/wiredtiger',
|
2014-11-04 15:47:12 -05:00
|
|
|
])
|
|
|
|
|
|
|
|
|
|
wiredtigerEnv.Library(
|
|
|
|
|
target="shim_wiredtiger",
|
|
|
|
|
source=[
|
|
|
|
|
'shim_wiredtiger.cpp'
|
|
|
|
|
])
|
|
|
|
|
|
2015-05-20 16:08:15 -04:00
|
|
|
if use_system_version_of_library("asio"):
|
2016-07-23 17:08:14 -04:00
|
|
|
# Normally, we would request LIBDEPS_ASIO_SYSLIBDEP here, but on most systems, the system asio
|
|
|
|
|
# will be header only so there is no library required. In the rare case where one is, it can be
|
|
|
|
|
# injected via LIBS= on the command line.
|
|
|
|
|
asioEnv = env.Clone()
|
2015-05-20 16:08:15 -04:00
|
|
|
else:
|
|
|
|
|
asioEnv = env.Clone()
|
2019-01-30 16:52:07 -05:00
|
|
|
asioEnv.InjectThirdParty(libraries=['asio'])
|
2017-04-27 15:06:37 -04:00
|
|
|
asioEnv.SConscript('asio-master/SConscript', exports={ 'env' : asioEnv })
|
2015-05-20 16:08:15 -04:00
|
|
|
asioEnv = asioEnv.Clone(
|
2017-07-07 11:45:50 -04:00
|
|
|
LIBDEPS_INTERFACE=[
|
|
|
|
|
'asio-master/asio',
|
2015-05-20 16:08:15 -04:00
|
|
|
])
|
|
|
|
|
|
|
|
|
|
asioEnv.Library(
|
|
|
|
|
target="shim_asio",
|
|
|
|
|
source=[
|
|
|
|
|
'shim_asio.cpp'
|
|
|
|
|
])
|
2015-07-27 13:53:21 -04:00
|
|
|
|
2016-04-22 14:42:28 -04:00
|
|
|
if use_system_version_of_library("intel_decimal128"):
|
|
|
|
|
intelDecimal128Env = env.Clone(
|
|
|
|
|
SYSLIBDEPS=[
|
|
|
|
|
env['LIBDEPS_INTEL_DECIMAL128_SYSLIBDEP'],
|
|
|
|
|
])
|
|
|
|
|
else:
|
|
|
|
|
intelDecimal128Env = env.Clone()
|
2019-01-30 16:52:07 -05:00
|
|
|
intelDecimal128Env.InjectThirdParty(libraries=['intel_decimal128'])
|
2016-04-22 14:42:28 -04:00
|
|
|
intelDecimal128Env.SConscript('IntelRDFPMathLib20U1/SConscript', exports={ 'env' : intelDecimal128Env })
|
|
|
|
|
intelDecimal128Env = intelDecimal128Env.Clone(
|
2017-07-07 11:45:50 -04:00
|
|
|
LIBDEPS_INTERFACE=[
|
|
|
|
|
'IntelRDFPMathLib20U1/intel_decimal128',
|
2016-04-22 14:42:28 -04:00
|
|
|
])
|
|
|
|
|
|
|
|
|
|
intelDecimal128Env.Library(
|
|
|
|
|
target="shim_intel_decimal128",
|
|
|
|
|
source=[
|
|
|
|
|
'shim_intel_decimal128.cpp'
|
|
|
|
|
])
|
2016-02-09 17:41:07 -05:00
|
|
|
|
2016-05-17 12:11:27 -04:00
|
|
|
if use_system_version_of_library("icu"):
|
|
|
|
|
icuEnv = env.Clone(
|
|
|
|
|
SYSLIBDEPS=[
|
|
|
|
|
env['LIBDEPS_ICUDATA_SYSLIBDEP'],
|
|
|
|
|
env['LIBDEPS_ICUI18N_SYSLIBDEP'],
|
|
|
|
|
env['LIBDEPS_ICUUC_SYSLIBDEP'],
|
2016-02-09 17:41:07 -05:00
|
|
|
])
|
2016-05-17 12:11:27 -04:00
|
|
|
else:
|
|
|
|
|
icuEnv = env.Clone()
|
2019-01-30 16:52:07 -05:00
|
|
|
icuEnv.InjectThirdParty(libraries=['icu'])
|
2016-05-17 12:11:27 -04:00
|
|
|
icuEnv.SConscript('icu4c' + icuSuffix + '/source/SConscript', exports={ 'env' : icuEnv })
|
|
|
|
|
icuEnv = icuEnv.Clone(
|
2017-07-07 11:45:50 -04:00
|
|
|
LIBDEPS_INTERFACE=[
|
|
|
|
|
'icu4c' + icuSuffix + '/source/icu_i18n',
|
2016-05-17 12:11:27 -04:00
|
|
|
])
|
|
|
|
|
|
|
|
|
|
icuEnv.Library(
|
|
|
|
|
target='shim_icu',
|
|
|
|
|
source=[
|
|
|
|
|
'shim_icu.cpp',
|
|
|
|
|
])
|
2019-03-14 13:38:03 -04:00
|
|
|
|
|
|
|
|
if use_system_version_of_library("kms-message"):
|
|
|
|
|
kmsEnv = env.Clone(
|
|
|
|
|
SYSLIBDEPS=[
|
|
|
|
|
env['LIBDEPS_KMS-MESSAGE_SYSLIBDEP'],
|
|
|
|
|
])
|
|
|
|
|
else:
|
|
|
|
|
kmsEnv = env.Clone()
|
|
|
|
|
kmsEnv.InjectThirdParty(libraries=['kms-message'])
|
|
|
|
|
kmsEnv.SConscript('kms-message/SConscript', exports={ 'env' : kmsEnv })
|
|
|
|
|
kmsEnv = kmsEnv.Clone(
|
|
|
|
|
LIBDEPS_INTERFACE=[
|
|
|
|
|
'kms-message/kms-message',
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
kmsEnv.Library(
|
|
|
|
|
target="shim_kms_message",
|
|
|
|
|
source=[
|
|
|
|
|
'shim_kms_message.cpp',
|
|
|
|
|
])
|
|
|
|
|
|