Skip to content

Conversation

egorzhdan
Copy link
Contributor

This fixes modularization errors that arise when importing a C++ header that contains #include <guiddef.h>, which might hijack this header from the WinSDK module where it belongs.

@egorzhdan egorzhdan requested a review from compnerd August 26, 2025 11:04
@egorzhdan egorzhdan requested a review from a team as a code owner August 26, 2025 11:04
@egorzhdan
Copy link
Contributor Author

@swift-ci please smoke test

@egorzhdan
Copy link
Contributor Author

Ugh, looks like this header is under /shared and not /um.

@compnerd
Copy link
Member

Yeah, the GUID definition is shared between um and km. We currently get it through transitive includes.

@@ -493,6 +493,17 @@ void GetWindowsFileMappings(
if (!AuxiliaryFile.empty())
fileMapping.redirectedFiles.emplace_back(std::string(WinSDKInjection),
AuxiliaryFile);

if (WindowsSDK.MajorVersion > 8) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do we still support older SDKs? This might be a bit simpler if we don't.

Copy link
Member

@compnerd compnerd Aug 28, 2025

Choose a reason for hiding this comment

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

Yes, we do support older SDKs, which is why this gets tricky, but only from 10.0.17763 (Windows 10 RS5).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see, so we should be able to remove this check then.

@@ -48,4 +54,5 @@ install(FILES
vcruntime.apinotes
vcruntime.modulemap
winsdk.modulemap
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps we should rename this to winsdk_um.modulemap?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds reasonable! Renamed it.

This fixes modularization errors that arise when importing a C++ header that contains `#include <guiddef.h>`, which might hijack this header from the WinSDK module where it belongs.
@egorzhdan
Copy link
Contributor Author

swiftlang/swift-installer-scripts#458

@swift-ci please test Windows

@egorzhdan
Copy link
Contributor Author

@swift-ci please smoke test macOS

@egorzhdan
Copy link
Contributor Author

@swift-ci please smoke test Linux

@egorzhdan
Copy link
Contributor Author

swiftlang/swift-installer-scripts#458

@swift-ci please build toolchain Windows ARM64

@grynspan grynspan added the Windows Platform: Windows label Sep 2, 2025
@egorzhdan
Copy link
Contributor Author

swiftlang/swift-installer-scripts#458

@swift-ci please build toolchain Windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Windows Platform: Windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants