summaryrefslogtreecommitdiff
path: root/site_scons
diff options
context:
space:
mode:
authorAndrew Morrow <acm@mongodb.com>2017-12-15 16:51:36 -0500
committerAndrew Morrow <acm@mongodb.com>2017-12-19 10:39:25 -0500
commit263b5b2cb3f808d3ba0f0e61894dd0f5f8874fbc (patch)
treefbe0f1f0972e2989231888f3641687512c7fb5eb /site_scons
parent508a73f1acda5cd500e8edc3bfef7f29fc82cb99 (diff)
downloadmongo-263b5b2cb3f808d3ba0f0e61894dd0f5f8874fbc.tar.gz
SERVER-30815 Library injections via LIBDEPS_DEPENDENTS should be private
But provide a way to force them public when needed
Diffstat (limited to 'site_scons')
-rw-r--r--site_scons/libdeps.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/site_scons/libdeps.py b/site_scons/libdeps.py
index 632ed29be53..f002c4f067e 100644
--- a/site_scons/libdeps.py
+++ b/site_scons/libdeps.py
@@ -264,6 +264,11 @@ def libdeps_emitter(target, source, env):
for dependent in env.get('LIBDEPS_DEPENDENTS', []):
if dependent is None:
continue
+
+ # Ignore any tuple'd in visibility override.
+ if isinstance(dependent, tuple):
+ dependent = dependent[0]
+
dependentWithIxes = SCons.Util.adjustixes(
dependent, lib_builder.get_prefix(env), lib_builder.get_suffix(env))
dependentNode = lib_node_factory(dependentWithIxes)
@@ -320,10 +325,16 @@ def shlibdeps_emitter(target, source, env):
for dependent in env.get('LIBDEPS_DEPENDENTS', []):
if dependent is None:
continue
+
+ visibility = dependency.Private
+ if isinstance(dependent, tuple):
+ visibility = dependent[1]
+ dependent = dependent[0]
+
dependentWithIxes = SCons.Util.adjustixes(
dependent, lib_builder.get_prefix(env), lib_builder.get_suffix(env))
dependentNode = lib_node_factory(dependentWithIxes)
- __append_direct_libdeps(dependentNode, [dependency(target[0], True, dependency.Public)])
+ __append_direct_libdeps(dependentNode, [dependency(target[0], True, visibility)])
for dependent in env.get('PROGDEPS_DEPENDENTS', []):
if dependent is None: