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

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

Merged
merged 1 commit into from
May 20, 2024

Conversation

cachemeifyoucan
Copy link
Contributor

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

Copy link
Contributor

@artemcm artemcm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great improvement. One step closer to removing search paths from main module compiles.

@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please smoke test

@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please smoke test

include/swift/AST/SearchPathOptions.h Show resolved Hide resolved
lib/AST/ModuleLoader.cpp Outdated Show resolved Hide resolved
@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please smoke 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
@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please smoke test

@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please smoke test macOS platform

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

3 participants