Skip to content

Commit db4fd6d

Browse files
committed
Runtimes: use the static module constructor in swiftCore
Use the static module constructor for swiftCore on Windows as the runtime functions are internal to the module. This fixes the last linker warning that we see with the standard library build when building dynamically. More importantly, this allows building swiftCore as a DLL with the new build system on Windows as we now treat any linker warnings as errors.
1 parent 1098951 commit db4fd6d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Runtimes/Core/core/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,8 @@ target_link_libraries(swiftCore
306306
swiftDemangling
307307
swiftShims
308308
swiftStdlibStubs
309-
swiftThreading)
309+
swiftThreading
310+
$<$<NOT:$<PLATFORM_ID:Darwin>>:swiftrt$<$<PLATFORM_ID:Windows>:T>>)
310311
target_link_options(swiftCore PRIVATE
311312
-nostartfiles)
312313
if(NOT POLICY CMP0157)

0 commit comments

Comments
 (0)