Skip to content

Commit ea87efa

Browse files
authored
Update ucrt.modulemap
Pull in corecrt in the `_complex` module as well. While the simple test case worked for this modularisation, the build of `CRT` on the older WinSDK would fail as: ``` C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\complex.h:12:10: error: 'corecrt.h' file not found 10 | #define _COMPLEX 11 | 12 | #include <corecrt.h> | `- error: 'corecrt.h' file not found 13 | 14 | #if (_CRT_HAS_CXX17 == 1) && !defined(_CRT_USE_C_COMPLEX_H) C:/Users/swift-ci/jenkins/workspace/swift-PR-windows/swift/stdlib/public/Platform/ucrt.swift:15:19: error: could not build C module '_complex' 13 | @_exported import ucrt // Clang module 14 | // Extra clang module that's split out from ucrt: 15 | @_exported import _complex | `- error: could not build C module '_complex' 16 | 17 | @available(swift, deprecated: 3.0, message: "Please use 'Double.pi' or '.pi' to get the value of correct type and avoid casting.") ```
1 parent 36f4a86 commit ea87efa

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

stdlib/public/Platform/ucrt.modulemap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ module _malloc [system] [extern_c] [no_undeclared_includes] {
1919
}
2020

2121
module _complex [system] [extern_c] [no_undeclared_includes] {
22+
use corecrt
2223
header "complex.h"
2324
export *
2425
}

0 commit comments

Comments
 (0)