-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Platform: Update module maps for the static SDK #81826
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
Platform: Update module maps for the static SDK #81826
Conversation
@swift-ci please test Windows platform |
@@ -101,6 +123,11 @@ module ucrt [system] { | |||
export * | |||
} | |||
|
|||
module stdnoreturn { |
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.
Why is this textual?
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.
The textual
annotation prevents the header from being compiled when the header is built. It is instead textually included on demand. It must still parse properly, mind you.
IIUC, for our use case, what this means is that its symbols are not directly included in the compiled stdnoreturn
module but they will still be present in the ucrt
module since this header is included by other headers in the module - this also applies to other textual
headers defined here.
This is a hackier solution than I would like but it works for all of the Windows 10 SDK versions that I have tried.
complex.h
is still being a pain because it includes ccomplex
if you build it in C++ mode and also disables some symbols, which is just wrong IMO.
For the rest, we can rely on Swift tests. It has been my experience that they are rather extensive.
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.
Right, I understand the behaviour of the textual heaader. I am wondering what is the cycle that this is trying to break. It seems that there are two cycles present:
stddef.h
stdnoreturn.h
TBH, making these two textual to make things work as a workaround is fine. This is still a better state than we were in previously.
Building with the Windows static SDK uncovered issues in the Windows module maps. Some of the headers were missing and others had incorrect layering. This updates the module maps to build with the static Windows SDK.
85494ba
to
72dad03
Compare
CC: @ian-twilightcoder - not sure if you have thoughts/suggestions on this, but I figured that I would try :) |
@swift-ci please test Windows platform |
@swift-ci please smoke test Linux platform |
@swift-ci please smoke test macOS platform |
Building with the Windows static SDK uncovered issues in the Windows module maps. Some of the headers were missing and others had incorrect layering. This updates the module maps to build with the static Windows SDK.