diff options
author | William Deegan <bill@baddogconsulting.com> | 2019-04-01 14:48:16 -0700 |
---|---|---|
committer | Andrew Morrow <acm@mongodb.com> | 2019-04-20 13:04:06 -0400 |
commit | 7bf320d5aa34e3dd51c3a7f868e77025782dd359 (patch) | |
tree | 27388c79ffa842592aac6890805a687341ea4537 /src/third_party | |
parent | 56de1d377689bd9e3c0884371df0da5b6d3f7cd9 (diff) | |
download | mongo-7bf320d5aa34e3dd51c3a7f868e77025782dd359.tar.gz |
SERVER-33111 Avoid spurious rebuilds when using -gsplit-dwarf
The issue was that builders with more than one target (potentially only when that 2nd or higher target is added in the emitter were not getting their implicit list cleared after a generated source is rebuilt. Thus leading to the implicit list order being incorrect when written to sconsign leaded to spurious rebuilds on second build
Closes #1307
Signed-off-by: Andrew Morrow <acm@mongodb.com>
Diffstat (limited to 'src/third_party')
-rw-r--r-- | src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Builder.py | 9 | ||||
-rw-r--r-- | src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Node/__init__.py | 6 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Builder.py b/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Builder.py index 073efcccfc3..2a7ebb12953 100644 --- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Builder.py +++ b/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Builder.py @@ -563,6 +563,15 @@ class BuilderBase(object): tlist, slist = self._create_nodes(env, target, source) + # If there is more than one target ensure that if we need to reset + # the implicit list to new scan of dependency all targets implicit lists + # are cleared. (SERVER-33111) + if len(tlist) > 1: + # print("Builder:_execute():Tlist > 1 -> %s"%[str(t) for t in tlist]) + for t in tlist: + t.target_peers = tlist + + # Check for errors with the specified target/source lists. _node_errors(self, env, tlist, slist) diff --git a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Node/__init__.py b/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Node/__init__.py index 74a34c55ce4..fb55233aa3b 100644 --- a/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Node/__init__.py +++ b/src/third_party/scons-3.0.4/scons-local-3.0.4/SCons/Node/__init__.py @@ -529,6 +529,7 @@ class Node(object, with_metaclass(NoSlotsPyPy)): __slots__ = ['sources', 'sources_set', + 'target_peers', '_specific_sources', 'depends', 'depends_set', @@ -783,6 +784,11 @@ class Node(object, with_metaclass(NoSlotsPyPy)): # waiting for this Node to be built. for parent in self.waiting_parents: parent.implicit = None + try: + for peer in parent.target_peers: + peer.implicit = None + except AttributeError as e: + pass self.clear() |