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.10 🍒][Explicit Module Builds] Restore prior behavior of consuming .h dependencies of binary module dependencies directly, instead of attempting to load their PCH #69111

Merged
merged 2 commits into from Oct 12, 2023

Conversation

artemcm
Copy link
Contributor

@artemcm artemcm commented Oct 10, 2023

Cherry-pick of #69109

• Release: Swift 5.10
• Explanation: We will now only record these dependencies in CAS mode, because we require explicit PCH tasks to be produced for imported header of binary module dependencies. In the meantime, in non-CAS mode loading clients will consume the .h files encoded in the .swiftmodules directly.

Followup changes to SwiftDriver will enable explicit PCH compilation of such dependenceis, but for the time being restore prior behavior for non-CAS explicit module builds.
• Scope of Issue: Explicit module builds
• Risk: Minimal, this change affects only code paths for explicit module builds, which are not yet default.
• Origination: Explicit Module Build feature development and addition of CAS-specific functionality.

Resolves rdar://116006619

@artemcm artemcm requested a review from nkcsgexi October 10, 2023 23:09
@artemcm artemcm requested a review from a team as a code owner October 10, 2023 23:09
@artemcm
Copy link
Contributor Author

artemcm commented Oct 11, 2023

@swift-ci test

@artemcm
Copy link
Contributor Author

artemcm commented Oct 11, 2023

@swift-ci test

…idging header is provided

In explicit module builds, bridging header is passed directly as a '.pch' input.

Loading clients may not be able to directly import this PCH because it was built against mis-matched dependencies with a different context hash. So instead they should directly injest the '.h' depndency and build it against their own set of dependencies.
…f binary modules unless in CAS mode

We only record these dependencies in CAS mode, because we require explicit PCH tasks to be produced for imported header of binary module dependencies. In the meantime, in non-CAS mode loading clients will consume the `.h` files encoded in the `.swiftmodules` directly.

Followup changes to SwiftDriver will enable explicit PCH compilation of such dependenceis, but for the time being restore prior behavior for non-CAS explicit module builds.

Resolves rdar://116006619
@artemcm
Copy link
Contributor Author

artemcm commented Oct 11, 2023

@swift-ci test and merge

@artemcm artemcm changed the title [5.10 🍒][Dependency Scanning] Do now write out bridging header dependencies of binary modules unless in CAS mode [5.10 🍒][Explicit Module Builds] Restore prior behavior of consuming .h dependencies of binary module dependencies directly, instead of attempting to load their PCH Oct 11, 2023
@artemcm
Copy link
Contributor Author

artemcm commented Oct 11, 2023

@swift-ci test and merge

@artemcm
Copy link
Contributor Author

artemcm commented Oct 12, 2023

apple/swift-driver#1464
@swift-ci test

@artemcm
Copy link
Contributor Author

artemcm commented Oct 12, 2023

apple/swift-driver#1464
@swift-ci test Windows platform

@artemcm artemcm merged commit 0ad87ab into apple:release/5.10 Oct 12, 2023
5 of 6 checks passed
@artemcm artemcm deleted the 510EBM_BridgingHeader_Fix branch October 13, 2023 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants