diff options
author | Andrew Morrow <acm@mongodb.com> | 2015-08-12 14:20:44 -0400 |
---|---|---|
committer | Andrew Morrow <acm@mongodb.com> | 2015-08-24 09:36:31 -0400 |
commit | 01fff117c028cb820755ba8a7a392ba4c51a0ecc (patch) | |
tree | ba614e67fb64ad51afe5426ea5b91d28bb003218 /site_scons | |
parent | dd15f9c211f5bc40b6fa8a7cd44350d3aeb87d89 (diff) | |
download | mongo-01fff117c028cb820755ba8a7a392ba4c51a0ecc.tar.gz |
SERVER-9666 Tag cyclic or incomplete libraries, add more missing edges
Diffstat (limited to 'site_scons')
-rw-r--r-- | site_scons/libdeps.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/site_scons/libdeps.py b/site_scons/libdeps.py index 257cce8f33c..78d39487780 100644 --- a/site_scons/libdeps.py +++ b/site_scons/libdeps.py @@ -125,7 +125,7 @@ def __get_syslibdeps(node): """ cached_var_name = syslibdeps_env_var + '_cached' if not hasattr(node.attributes, cached_var_name): - syslibdeps = [] + syslibdeps = node.get_env().Flatten(node.get_env().get(syslibdeps_env_var, [])) for lib in __get_libdeps(node): for syslib in node.get_env().Flatten(lib.get_env().get(syslibdeps_env_var, [])): if syslib: @@ -304,6 +304,12 @@ def shlibdeps_emitter(target, source, env): return target, source +def expand_libdeps_tags(source, target, env, for_signature): + results = [] + for expansion in env.get('LIBDEPS_TAG_EXPANSIONS', []): + results.append(expansion(source, target, env, for_signature)) + return results + def setup_environment(env, emitting_shared=False): """Set up the given build environment to do LIBDEPS tracking.""" @@ -312,6 +318,8 @@ def setup_environment(env, emitting_shared=False): except KeyError: env['_LIBDEPS'] = '$_LIBDEPS_LIBS' + env['_LIBDEPS_TAGS'] = expand_libdeps_tags + # TODO: remove this # this is a horrible horrible hack for # for 32-bit solaris @@ -335,7 +343,7 @@ def setup_environment(env, emitting_shared=False): env.Append( PROGEMITTER=libdeps_emitter, SHLIBEMITTER=libdeps_emitter) - env.Prepend(_LIBFLAGS=' $LINK_WHOLE_ARCHIVE_START $LINK_LIBGROUP_START $_LIBDEPS $LINK_LIBGROUP_END $LINK_WHOLE_ARCHIVE_END $_SYSLIBDEPS ') + env.Prepend(_LIBFLAGS=' $_LIBDEPS_TAGS $LINK_WHOLE_ARCHIVE_START $LINK_LIBGROUP_START $_LIBDEPS $LINK_LIBGROUP_END $LINK_WHOLE_ARCHIVE_END $_SYSLIBDEPS ') for builder_name in ('Program', 'SharedLibrary', 'LoadableModule'): try: update_scanner(env['BUILDERS'][builder_name]) |