Skip to content

Commit 848b6b5

Browse files
committed
[Runtime][Windows] Need to link with Synchronization.lib.
We're using some functions from Synchronization.lib now, after the threading changes. rdar://90776105
1 parent 709d06f commit 848b6b5

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

stdlib/public/Concurrency/CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ endif()
2525
set(SWIFT_RUNTIME_CONCURRENCY_C_FLAGS)
2626
set(SWIFT_RUNTIME_CONCURRENCY_SWIFT_FLAGS)
2727

28+
set(swift_concurrency_private_link_libraries swiftThreading)
29+
if(CMAKE_SYSTEM_NAME STREQUAL Windows)
30+
list(APPEND swift_concurrency_private_link_libraries Synchronization)
31+
endif()
32+
2833
if("${SWIFT_CONCURRENCY_GLOBAL_EXECUTOR}" STREQUAL "dispatch")
2934
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
3035
include_directories(AFTER
@@ -44,7 +49,6 @@ else()
4449
message(FATAL_ERROR "Invalid value for SWIFT_CONCURRENCY_GLOBAL_EXECUTOR (\"${SWIFT_CONCURRENCY_GLOBAL_EXECUTOR}\").")
4550
endif()
4651

47-
4852
if(NOT SWIFT_CONCURRENCY_USES_DISPATCH)
4953

5054
endif()
@@ -127,7 +131,7 @@ add_swift_target_library(swift_Concurrency ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} I
127131
SWIFT_MODULE_DEPENDS_HAIKU Glibc
128132
SWIFT_MODULE_DEPENDS_WINDOWS CRT
129133

130-
PRIVATE_LINK_LIBRARIES swiftThreading
134+
PRIVATE_LINK_LIBRARIES ${swift_concurrency_private_link_libraries}
131135

132136
LINK_LIBRARIES ${swift_concurrency_link_libraries}
133137

stdlib/public/core/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ elseif(SWIFT_PRIMARY_VARIANT_SDK STREQUAL LINUX)
260260
list(APPEND swift_core_private_link_libraries)
261261
endif()
262262
elseif(SWIFT_PRIMARY_VARIANT_SDK STREQUAL WINDOWS)
263-
list(APPEND swift_core_private_link_libraries shell32;DbgHelp)
263+
list(APPEND swift_core_private_link_libraries shell32;DbgHelp;Synchronization)
264264
endif()
265265

266266
option(SWIFT_CHECK_ESSENTIAL_STDLIB

0 commit comments

Comments
 (0)