Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.9 🍒][Explicit Module Builds] Add support for header dependencies of binary Swift module dependencies #1399

Merged

Conversation

artemcm
Copy link
Contributor

@artemcm artemcm commented Jul 19, 2023

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

…y Swift module dependencies

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.
@artemcm
Copy link
Contributor Author

artemcm commented Jul 19, 2023

@swift-ci test

1 similar comment
@artemcm
Copy link
Contributor Author

artemcm commented Jul 25, 2023

@swift-ci test

@artemcm artemcm requested a review from nkcsgexi July 25, 2023 16:29
@artemcm artemcm merged commit e1cba23 into swiftlang:release/5.9 Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants