Skip to content

Commit 6920af6

Browse files
committed
Further split ucrt + duplicate stdlib
1 parent 858f71d commit 6920af6

File tree

2 files changed

+22
-16
lines changed

2 files changed

+22
-16
lines changed

stdlib/public/Platform/ucrt.modulemap

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,19 @@ module _complex [system] [no_undeclared_includes] {
2424
export *
2525
}
2626

27+
module _fenv [system] [no_undeclared_includes] {
28+
use corecrt
29+
use _float
30+
header "fenv.h"
31+
export *
32+
}
33+
34+
module _float [system] [no_undeclared_includes] {
35+
use corecrt
36+
header "float.h"
37+
export *
38+
}
39+
2740
module _stddef [system] [no_undeclared_includes] {
2841
header "stddef.h"
2942
export *
@@ -40,6 +53,8 @@ module ucrt [system] {
4053

4154
module C {
4255
export _complex
56+
export _fenv
57+
export _float
4358
export _stddef
4459
export _stdlib
4560

@@ -53,16 +68,6 @@ module ucrt [system] {
5368
export *
5469
}
5570

56-
module fenv {
57-
header "fenv.h"
58-
export *
59-
}
60-
61-
module float {
62-
header "float.h"
63-
export *
64-
}
65-
6671
module inttypes {
6772
header "inttypes.h"
6873
export *
@@ -86,13 +91,11 @@ module ucrt [system] {
8691
module stdio {
8792
header "stdio.h"
8893
export *
94+
}
8995

90-
// NOTE(compnerd) this is a horrible workaround for the fact that
91-
// Microsoft has fully inlined nearly all of the printf family of
92-
// functions in the headers which results in the definitions being elided
93-
// resulting in undefined symbols. The legacy_stdio_definitions provides
94-
// out-of-line definitions for these functions.
95-
link "legacy_stdio_definitions"
96+
module stdlib {
97+
header "stdlib.h"
98+
export *
9699
}
97100

98101
module string {

stdlib/public/Platform/ucrt.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
@_exported import ucrt // Clang module
1414
// Extra clang module that's split out from ucrt:
1515
@_exported import _complex
16+
@_exported import _fenv
17+
@_exported import _float
18+
@_exported import _malloc
1619
@_exported import _stddef
1720
@_exported import _stdlib
1821

0 commit comments

Comments
 (0)