summaryrefslogtreecommitdiff
path: root/src/SConscript
blob: b046e91173c83f3114ba52cec48a3da0f1778491 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# -*- mode: python; -*-
#
# This is the principle SConscript file, invoked by the SConstruct.  Its job is
# to delegate to any and all per-module SConscript files.

import SCons

Import('env')
Import('module_sconscripts')

# 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',
    ],
)

# NOTE: We must do third_party first as it adds methods to the environment
# that we need in the mongo sconscript
env.SConscript('third_party/SConscript', exports=['env'])

# Inject common dependencies from third_party globally for all core mongo code
# and modules. Ideally, pcre wouldn't be here, but enough things require it
# now that it seems hopeless to remove it.
env.InjectThirdParty(libraries=[
    'abseil-cpp',
    'boost',
    'fmt',
    'pcre',
    'safeint',
    'variant',
])

# Run the core mongodb SConscript.
env.SConscript('mongo/SConscript', exports=['env'])

# Run SConscripts for any modules in play
env.SConscript(module_sconscripts, exports=['env'])