Skip to content

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
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