Skip to content

Commit fbdd1eb

Browse files
committed
Platform: improve WinSDK modulemap to repair build
The WinSDK module failed to expose WinBase properly for reuse, which the newer clang seems to object to (via an assertion). Add a separate module for WinBase which allows reuse of the definitions without causing conflicts. This caused some additional fallout requiring the creation of the WinSVC submodule (service handling, part of security and identity) and splitting up the legacy WinSock header from the WinSock2 module. This allows building Foundation again on Windows.
1 parent 903a06f commit fbdd1eb

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

stdlib/public/Platform/winsdk.modulemap

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ module WinSDK [system] {
2121
link "WS2_32.Lib"
2222
}
2323

24+
module WinSock {
25+
header "winsock.h"
26+
}
27+
2428
module core {
2529
module acl {
2630
header "AclAPI.h"
@@ -206,6 +210,11 @@ module WinSDK [system] {
206210
export *
207211
}
208212

213+
module WinBase {
214+
header "winbase.h"
215+
export *
216+
}
217+
209218
module WinCrypt {
210219
header "wincrypt.h"
211220
export *
@@ -241,5 +250,12 @@ module WinSDK [system] {
241250

242251
link "RpcRT4.Lib"
243252
}
253+
254+
module WinSVC {
255+
header "winsvc.h"
256+
export *
257+
258+
link "AdvAPI32.Lib"
259+
}
244260
}
245261

0 commit comments

Comments
 (0)