-
Notifications
You must be signed in to change notification settings - Fork 10.6k
[Dependency Scanning] Only omit Clang VFS overlays from Swift dependencies if unused by their Clang dependencies #71691
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
183271d to
d013a02
Compare
|
@swift-ci test |
d013a02 to
ce8f7b3
Compare
|
@swift-ci smoke test |
ce8f7b3 to
75babdb
Compare
|
@swift-ci smoke test |
cachemeifyoucan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with a small improvement suggestion in line.
I had an idea of fixing this problem completely long term by:
- switch clang importer to use direct cc1 only: #71118
- do a dependency scanning for clang importer for each swift invocation and use the returning cc1 arg to construct clang importer
Then any optimization can be done in clang scanner, swift will get it for free.
I had a prototype for clang importer dep scanning too. I just need to find it somewhere.
…ncies if unused by Clang dependencies We previously blanket omitted `-Xcc -vfsoverlay` flags from Swift module dependencies' command-line recipes. This is incorrect as the Swift module must have an exact matching VFS overlay that its Clang dependencies use, in order to load said Clang dependnecies successfully and resolve their headers as expected and as was done during the scan. Resolves rdar://122667530
75babdb to
500d2e5
Compare
|
@swift-ci smoke test |
I think this sounds very promising! I assume we would do this faux-scan after we actually resolved all the Clang dependencies so that it is as near to free as possible? Would be cool to get the benefit of all the command-line optimization work Clang is doing "for free". |
We previously blanket omitted
-Xcc -vfsoverlayflags from Swift module dependencies' command-line recipes. This is incorrect as the Swift module must have an exact matching VFS overlay that its Clang dependencies use, in order to load said Clang dependnecies successfully and resolve their headers as expected and as was done during the scan.Resolves rdar://122667530