summaryrefslogtreecommitdiff
path: root/site_scons
diff options
context:
space:
mode:
authorAndrew Morrow <acm@mongodb.com>2017-01-04 13:32:06 -0500
committerAndrew Morrow <acm@mongodb.com>2017-01-06 21:59:41 -0500
commitef364240d7d48a8a352afb91df5cddbd34394021 (patch)
tree10a9913a0e65f3e862ebb38c81e8ed6cdf63ecd4 /site_scons
parent6dd2c8edd95ad1e3afc8473e8d5e5885572c9477 (diff)
downloadmongo-ef364240d7d48a8a352afb91df5cddbd34394021.tar.gz
SERVER-27577 Only apply thin_archive handling to StaticLibrary
By default on SCons, the Library and StaticLibrary builders are the same object, so adding the target_factory to StaticLibrary is sufficient. If they aren't the same, then even more important to only modify SaticLibrary, since Library may have been re-purposed to mean something else. In our case it does mean something different when using --link-model=dynamic, so this oversight inadvertently changed the signature calculations for dynamic libaries. Also includes a drive-by fix to add LoadableModule to the builders affected by the abilink.py tool, since a LoadableModule is also a shared library on the platforms where abidw is in play.
Diffstat (limited to 'site_scons')
-rw-r--r--site_scons/site_tools/abilink.py1
-rw-r--r--site_scons/site_tools/thin_archive.py1
2 files changed, 1 insertions, 1 deletions
diff --git a/site_scons/site_tools/abilink.py b/site_scons/site_tools/abilink.py
index f0c38d37a94..6ca2c7dc6b8 100644
--- a/site_scons/site_tools/abilink.py
+++ b/site_scons/site_tools/abilink.py
@@ -71,6 +71,7 @@ def generate(env):
return env.ShlibNode(arg)
env['BUILDERS']['SharedLibrary'].target_factory = shlib_target_factory
+ env['BUILDERS']['LoadableModule'].target_factory = shlib_target_factory
def exists(env):
result = _detect(env) != None
diff --git a/site_scons/site_tools/thin_archive.py b/site_scons/site_tools/thin_archive.py
index 05ff702142b..b4bc5f97d6f 100644
--- a/site_scons/site_tools/thin_archive.py
+++ b/site_scons/site_tools/thin_archive.py
@@ -70,7 +70,6 @@ def generate(env):
def archive_target_factory(arg):
return env.ThinArchiveNode(arg)
- env['BUILDERS']['Library'].target_factory = archive_target_factory
env['BUILDERS']['StaticLibrary'].target_factory = archive_target_factory
env['ARFLAGS'] = SCons.Util.CLVar([arflag if arflag != "rc" else "rcsTD" for arflag in env['ARFLAGS']])