Skip to content

Commit 85494ba

Browse files
committed
Platform: Update module maps for the static SDK
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.
1 parent 8b4740f commit 85494ba

File tree

2 files changed

+96
-5
lines changed

2 files changed

+96
-5
lines changed

stdlib/public/Platform/ucrt.modulemap

Lines changed: 66 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,31 +26,48 @@ module _complex [system] [no_undeclared_includes] {
2626
}
2727

2828
module _stddef [system] [no_undeclared_includes] {
29-
header "stddef.h"
30-
export *
29+
use corecrt
30+
textual header "stddef.h"
3131
}
3232

3333
module _stdlib [system] [no_undeclared_includes] {
3434
use corecrt
35+
use vcruntime
3536
header "stdlib.h"
3637
export *
3738
}
3839

40+
module _ctype [system] [no_undeclared_includes] {
41+
use corecrt
42+
textual header "ctype.h"
43+
}
44+
45+
module _errno [system] [no_undeclared_includes] {
46+
use corecrt
47+
textual header "errno.h"
48+
}
49+
50+
module _stdnoreturn [system] [no_undeclared_includes] {
51+
use corecrt
52+
textual header "stdnoreturn.h"
53+
}
54+
55+
3956
module ucrt [system] {
4057
export _malloc
4158

4259
module C {
4360
export _complex
44-
export _stddef
4561
export _stdlib
4662

63+
4764
module ctype {
4865
header "ctype.h"
4966
export *
5067
}
5168

5269
module errno {
53-
header "errno.h"
70+
textual header "errno.h"
5471
export *
5572
}
5673

@@ -84,6 +101,11 @@ module ucrt [system] {
84101
export *
85102
}
86103

104+
module stdalign {
105+
header "stdalign.h"
106+
export *
107+
}
108+
87109
module stdio {
88110
header "stdio.h"
89111
export *
@@ -101,6 +123,11 @@ module ucrt [system] {
101123
export *
102124
}
103125

126+
module stdnoreturn {
127+
textual header "stdnoreturn.h"
128+
export *
129+
}
130+
104131
module string {
105132
header "string.h"
106133
export *
@@ -175,6 +202,11 @@ module ucrt [system] {
175202
}
176203
}
177204

205+
module _corecrt_memcpy_s [system] [no_undeclared_includes] {
206+
textual header "corecrt_memcpy_s.h"
207+
export *
208+
}
209+
178210
module corecrt [system] {
179211
use vcruntime
180212

@@ -187,8 +219,14 @@ module corecrt [system] {
187219
export *
188220
}
189221

222+
module direct {
223+
header "corecrt_wdirect.h"
224+
export *
225+
}
226+
190227
module io {
191228
header "corecrt_io.h"
229+
header "corecrt_wio.h"
192230
export *
193231
}
194232

@@ -202,11 +240,35 @@ module corecrt [system] {
202240
export *
203241
}
204242

243+
module memory {
244+
header "corecrt_memory.h"
245+
export *
246+
}
247+
248+
module memcpy {
249+
textual header "corecrt_memcpy_s.h"
250+
}
251+
252+
module process {
253+
header "corecrt_wprocess.h"
254+
export *
255+
}
256+
257+
module search {
258+
header "corecrt_search.h"
259+
export *
260+
}
261+
205262
module share {
206263
header "corecrt_share.h"
207264
export *
208265
}
209266

267+
module ctype {
268+
header "corecrt_wctype.h"
269+
export *
270+
}
271+
210272
module stdio {
211273
header "corecrt_wstdio.h"
212274
export *
@@ -227,4 +289,3 @@ module corecrt [system] {
227289
export *
228290
}
229291
}
230-

stdlib/public/Platform/vcruntime.modulemap

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,45 @@ module vcruntime [system] {
100100

101101
header "vcruntime.h"
102102

103+
module iso646 {
104+
header "iso646.h"
105+
export *
106+
}
107+
108+
module limits {
109+
header "limits.h"
110+
export *
111+
}
112+
103113
module setjmp {
104114
header "setjmp.h"
105115
export *
106116
}
107117

118+
module stdarg {
119+
header "stdarg.h"
120+
export *
121+
}
122+
123+
module stdbool {
124+
header "stdbool.h"
125+
export *
126+
}
127+
108128
module stdint {
109129
header "stdint.h"
110130
export *
111131
}
132+
133+
module string {
134+
header "vcruntime_string.h"
135+
export *
136+
}
137+
138+
module vadefs {
139+
header "vadefs.h"
140+
export *
141+
}
112142
}
113143

114144
module std_config [system] {

0 commit comments

Comments
 (0)