Skip to content

[6.0][ScanDependency] Pass crossimport overlay file to swift-frontend #73753

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

Conversation

cachemeifyoucan
Copy link
Contributor

Explanation: Teach dependency scanner to pass cross import overlay file to swift-frontend for main module compilation. This allows swift-frontend not to repeat the file system search for overlay files when loading modules.
Scope: For swift caching, this is needed for loading cross import from objc frameworks since the module map file location is abstract away during the build for caching purpose.
Issue: rdar://127844120
Original PR: #73601
Reviewer: @artemcm
Risk: Low
Tests: Unit test

Teach dependency scanner to pass cross import overlay file to
swift-frontend for main module compilation. This allows swift-frontend
not to repeat the file system search for overlay files when loading
modules.

This also fixes the issue when caching is enabled, the cross import
doesn't work when the first module is a clang module because the module
built with caching using clang include tree does not preserve
DefinitionLoc which is used to inferred the modulemap location for cross
import overlay search.

rdar://127844120
(cherry picked from commit cf8187a)
@cachemeifyoucan cachemeifyoucan requested a review from a team as a code owner May 20, 2024 17:49
@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please test

@cachemeifyoucan
Copy link
Contributor Author

Please test with following PR:
#73757

@swift-ci please test linux platform

@etcwilde
Copy link
Member

@swift-ci please test linux platform

@cachemeifyoucan cachemeifyoucan merged commit 87878f1 into swiftlang:release/6.0 May 21, 2024
5 checks passed
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.

3 participants