[5.9 🍒][Explicit Module Builds] Add support for header dependencies of binary Swift module dependencies #1399
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.
Cherry-pick of
#1375
• Release: 5.9
• Explanation: When we encounter a pre-built Swift binary module dependency (without an interface file), such module may have been built with a bridging header, which must still be present and is referenced by the binary
.swiftmodule
as either a.h
or, more-likely, a pre-built.pch
in a fully-explicit build.Clients must be able to know about such header dependencies in order to be able to import this binary module, because this binary module may be referencing types brought in via its bridging header. The build-system client (
swift-driver
) will then ensure these header dependencies are fed as inputs to all requiring compilation tasks.This adds support to the driver to query such header dependencies and feed them as inputs to all requiring compilation tasks.
• Reviewed by: @nkcsgexi @cachemeifyoucan
• Scope of Issue: Explicitly-built targets with binary module dependencies which were built with a PCH are unable to resolve references to said-PCH-defined symbols.
• Risk: Low. This change modifies code that does not run on default (Implicit Modules) compilation code-path, and the change itself is straight-forward and small, for affected code-paths.
• Testing: Automated tests added to the driver test suite.
Resolves rdar://108288193