diff options
author | Gabriel Russell <gabriel.russell@mongodb.com> | 2018-05-11 13:29:09 -0400 |
---|---|---|
committer | Gabriel Russell <gabriel.russell@mongodb.com> | 2018-05-11 16:45:32 -0400 |
commit | 31fc16ed8bef28086ac1374784ffd4a6b5dc8279 (patch) | |
tree | 33e58a711d9005d47147e7d5c63364113a64a4b2 /site_scons | |
parent | dd26de5b95b6be319d8df25d30dbfa0c7a23f77a (diff) | |
download | mongo-31fc16ed8bef28086ac1374784ffd4a6b5dc8279.tar.gz |
SERVER-34957 remove unused libdeps_exploring tracking from dagger.py
Diffstat (limited to 'site_scons')
-rw-r--r-- | site_scons/site_tools/dagger/dagger.py | 37 |
1 files changed, 4 insertions, 33 deletions
diff --git a/site_scons/site_tools/dagger/dagger.py b/site_scons/site_tools/dagger/dagger.py index 1eeefe1ea37..bace834783b 100644 --- a/site_scons/site_tools/dagger/dagger.py +++ b/site_scons/site_tools/dagger/dagger.py @@ -48,19 +48,6 @@ LIB_DB = [] # Stores every SCons library nodes OBJ_DB = [] # Stores every SCons object file node EXE_DB = {} # Stores every SCons executable node, with the object files that build into it {Executable: [object files]} - -class DependencyCycleError(SCons.Errors.UserError): - """Exception representing a cycle discovered in library dependencies.""" - - def __init__(self, first_node): - super(DependencyCycleError, self).__init__() - self.cycle_nodes = [first_node] - - def __str__(self): - return "Library dependency cycle detected: " + " => ".join( - str(n) for n in self.cycle_nodes) - - def list_process(items): """From WIL, converts lists generated from an NM command with unicode strings to lists with ascii strings @@ -146,28 +133,12 @@ def __compute_libdeps(node): the attribute that it uses is populated by the Libdeps.py script """ - if getattr(node.attributes, 'libdeps_exploring', False): - raise DependencyCycleError(node) - env = node.get_env() deps = set() - node.attributes.libdeps_exploring = True - try: - try: - for child in env.Flatten(getattr(node.attributes, 'libdeps_direct', - [])): - if not child: - continue - deps.add(child) - - except DependencyCycleError as e: - if len(e.cycle_nodes) == 1 or e.cycle_nodes[0] != e.cycle_nodes[ - -1]: - e.cycle_nodes.insert(0, node) - - logging.error("Found a dependency cycle" + str(e.cycle_nodes)) - finally: - node.attributes.libdeps_exploring = False + for child in env.Flatten(getattr(node.attributes, 'libdeps_direct', [])): + if not child: + continue + deps.add(child) return deps |