summaryrefslogtreecommitdiff
path: root/src/third_party/gperftools
diff options
context:
space:
mode:
authorRyan Egesdahl <ryan.egesdahl@mongodb.com>2020-10-20 08:43:36 -0700
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-11-26 08:56:00 +0000
commit82ef2151223ec184682e752436ac07916500253f (patch)
tree656de495698932e1fecd1725f6e4b95786193109 /src/third_party/gperftools
parent515723d10def74299cf7729148f946b538b82797 (diff)
downloadmongo-82ef2151223ec184682e752436ac07916500253f.tar.gz
SERVER-48291 Add global dependency pushdown to libdeps
We sometimes have situations where a dependency applies at a large scope, such as in the case of tcmalloc, which can apply everywhere. What we have done previously is to hack these dependencies into the LIBDEPS environment variable by adding a builder to all nodes that can produce a compiler result. This is, as stated previously, hackish and hard to control, and it results in adding a Public dependency to all those nodes. What we now do instead is to define LIBDEPS_GLOBAL on the *build environment* (not the Builder node) listing the targets we would like to push down to all other nodes below that point. This has the effect of adding those targets as Private dependencies on all Builder nodes from that point downward, which means some common Public dependencies can be converted to a Private dependency that is stated only once.
Diffstat (limited to 'src/third_party/gperftools')
-rw-r--r--src/third_party/gperftools/SConscript6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/third_party/gperftools/SConscript b/src/third_party/gperftools/SConscript
index ae84f362e01..2025d7a9ea6 100644
--- a/src/third_party/gperftools/SConscript
+++ b/src/third_party/gperftools/SConscript
@@ -125,5 +125,11 @@ env.Library(
],
# We don't want the shim_allocator hack to apply to this library, since
# otherwise we would create a loop.
+ LIBDEPS_GLOBAL=[
+ dep
+ for dep in env.get('LIBDEPS_GLOBAL', [])
+ if not dep.endswith('shim_allocator')
+ ],
+ # TODO: Remove when SERVER-48291 is merged into stable build tools
DISABLE_ALLOCATOR_SHIM_INJECTION=True,
)