-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix Windows when C compiler is ignorant of system module #3151
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
base: main
Are you sure you want to change the base?
Conversation
As long as this doesn't break current builds, I believe it's a worthy add-on -- can anyone trigger a Windows toolchain build? |
I'm confused by this one; CF shouldn't be visible on Windows at all. @compnerd? |
Yeah, CoreFoundation isn't visible on Windows, I don't think that this is about clients. This feels like it is papering over some other issue. |
CF is visible to So far these problems are met:
I think the first one is reasonable: we’re also meeting this on other platforms. The second problem is because the constants defined in |
I think @compnerd fixed at least the latter on In general, Foundation reexports some amount of the C stdlib when imported — but on Windows that's CRT, not WinSDK. Why are we exporting |
List of fixed issues
|
3ee4ed0
to
f87197d
Compare
Symbols that are re-exported from @implementationOnly modules harms usability, so we explicitly import them from WinSDK.
Some constants are exported by CoreFoundation, but they has mismatched type with WinSDK overlay. Set them explicitly.
Any other questions on this pitch? @millenomi |
Can you trigger a Windows build to see if anything breaks? @millenomi |
Ping |
Thanks @stevapple. One more question -- do we need to mark the |
I'm afraid that's not possible👀 A small part of core |
Before merging this, could you please trigger a Windows toolchain build to verify that it doesn't break? |
Both of the issues are raised because symbols
CoreFoundation
conflicts with the interface ofWinSDK
. Since these libraries are implementation only, they shouldn't become the interface of Foundation, so we should resolve the overload by manually pick up fromWinSDK
.These problem blocks Foundation from compiling when C compiler has no knowledge of system module maps, which is the case for other platforms.
WinSDK