Fix for regression introduced in commit 7302245 #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Entire subtrees of dependencies were skipped in preselectInferenceRules leading to incorrect build order of dependencies. The assumption that if a target has commands, than no further processing of its dependencies is necessary is incorrect. In our specific case, this led to linking of dll starting before any of the object files were built for the dll.
Fixed the original performance problem with an extra flag instead, that marks whether a target (and its dependency subtree) has already been visited. preselectInferenceRules still completes instantly for a large project, and build order is correct.