Skip to content

Commit 08cf801

Browse files
authored
Merge pull request swiftlang#23030 from compnerd/this-shall-be-part-of-my-legacy
stdlib: link against legacy_stdio_definitions on Windows
2 parents 1ef4c23 + c826dea commit 08cf801

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

stdlib/public/Platform/ucrt.modulemap

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,13 @@ module ucrt [system] {
6060
module stdio {
6161
header "stdio.h"
6262
export *
63+
64+
// NOTE(compnerd) this is a horrible workaround for the fact that
65+
// Microsoft has fully inlined nearly all of the printf family of
66+
// functions in the headers which results in the definitions being elided
67+
// resulting in undefined symbols. The legacy_stdio_definitions provides
68+
// out-of-line definitions for these functions.
69+
link "legacy_stdio_definitions"
6370
}
6471

6572
module stdlib {

0 commit comments

Comments
 (0)