Skip to content

Commit b9af6b9

Browse files
committed
[Build] Explicitly include threading library when not building stdlib.
The threading code is required by some of the compatibility modules, but we weren't pulling it in unless we were building the standard library. That breaks the build when the standard library build is disabled, so explicitly include it. rdar://90776105
1 parent 23bcf9c commit b9af6b9

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,6 +1126,9 @@ endif()
11261126
if(SWIFT_BUILD_STDLIB)
11271127
add_subdirectory(stdlib)
11281128
else()
1129+
# Some of the things below depend on the threading library
1130+
add_subdirectory(stdlib/public/Threading)
1131+
11291132
if(SWIFT_BUILD_STDLIB_EXTRA_TOOLCHAIN_CONTENT)
11301133
add_subdirectory(stdlib/toolchain)
11311134
endif()

stdlib/public/BackDeployConcurrency/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,4 @@ set(LLVM_OPTIONAL_SOURCES
6666
TaskSleepDuration.swift)
6767

6868
add_subdirectory(../Concurrency stdlib/public/BackDeployConcurrency)
69+

stdlib/public/Threading/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# This is the counterpart to lib/Threading/CMakeLists.txt. Any updates
22
# need to be reflected in both places.
33

4+
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/modules")
5+
include(AddSwiftStdlib)
6+
47
add_swift_target_library(swiftThreading OBJECT_LIBRARY
58
"${SWIFT_SOURCE_DIR}/lib/Threading/C11.cpp"
69
"${SWIFT_SOURCE_DIR}/lib/Threading/Linux.cpp"

0 commit comments

Comments
 (0)