Skip to content

[5.9] backport platform modularisation changes for Windows #67632

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

Merged
merged 11 commits into from
Aug 1, 2023

Conversation

compnerd
Copy link
Member

@compnerd compnerd commented Jul 31, 2023

Explanation:
This cherry-picks a number of changes that have been applied to the platform modularisation on main to enable C++ interop (and some dependencies). This enables fixes to the use of std.map on Windows.

Scope:
Changes the platform specific modularisation for Windows' platform SDK to enable importing a greater number of APIs properly into Windows. The primary one that motivated this change was the fixes to enable the use of std.map on Windows for C++ interop.

Issue:

Risk:
This should be a relatively low risk change as it is platform constrained and impacts the manner in which headers are imported through the Clang Importer, changing the module definitions to allow better modularisation. Any issues caused by this would be caught during the CI as this path is exercised for the unit tests and building the SDK Overlay components.

Testing:
The standard CI testing to ensure that the CI hosts are comfortable with the alternations to the module definition. Locally, tested with the Firebase C++ SDK to ensure that std.map members are now imported properly.

Reviewer:
@hyp

compnerd and others added 11 commits July 31, 2023 15:48
This adds the Windows credentials API to the modulemap for the Windows
SDK module.
Add a module definition for importing the URL Monikers interfaces.  This
is in service of DocC.
Specify the C++ standard required for these submodules.  Although this
has no practical implications, it is useful for isolating the features
with different C++ standards.
Add the missing submodule for `iomanip` on Windows.
These headers are not meant to be publicly consumed, introduce a
`_Private` module for internal use for the `std` module.
This adds the `xutility` module to strip that from the first modular
inclusion of the header.
Add a couple of missing submodules to the modulemap.  This is for
completeness and to help with newer MSVCPRT releases.
These modules were deprecated and do not exist in the distribution,
remove the commented out form.
This was detected as missing when trying to re-modularise MSVCPRT.
Add the missing `std._Private.xstddef`, `std._Private.yvals`, and
`std._Private.yvals_core` modules.  This repairs the use of `std.map` as
a private member variable of a type with an explicit ctor.
@compnerd
Copy link
Member Author

@swift-ci please test

Copy link
Member

@DougGregor DougGregor left a comment

Choose a reason for hiding this comment

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

Only impacts Windows build. LGTM

@compnerd compnerd merged commit a138878 into swiftlang:release/5.9 Aug 1, 2023
@compnerd compnerd deleted the compnerd/5.9-modules-I branch August 1, 2023 15:53
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.

5 participants