Skip to content

Commit c46d4af

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 aa0265b commit c46d4af

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-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/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)