[Explicit Module Builds] Re-scan all clang modules against all targets against which they will be built. #214
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.
Some background on this issue:
When building a Swift module at a fixed target version, the module may have dependencies which specify a different target version. It is possible that in this case, multiple swift modules, with different targets, have a dependency on the same Clang module. There is a hard requirement that the target version of the Clang module compilation match exactly the target version of the depending Swift module compilation.
The problem this PR addresses:
Dependency scanning results may vary depending on the target version specified on the dependency scanning action. If the scanning action is performed at a fixed target, and the scanned module is later compiled with a higher version target, miscomputation may occur due to dependencies present only at the higher version number and thus not detected by the dependency scanner.
Uses the newly-added Clang dependency scanning mode in the swift-frontend, added here:
swiftlang/swift#33522
Resolves rdar://67079780