Skip to content

Commit 2544509

Browse files
authored
Merge pull request #69044 from kubamracek/embedded-concurrency-only-if-stdlib-optimized
[embedded] Do not build the embedded Concurrency module without an optimized stdlib
2 parents da5aec2 + 6264386 commit 2544509

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

stdlib/public/Concurrency/CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,12 @@ add_swift_target_library(swift_Concurrency ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} I
175175
)
176176

177177
# Embedded Swift Concurrency library
178-
# For now, we build a hardcoded list of target triples of the embedded stdlib,
179-
# and only when building Swift on macOS.
180-
if(SWIFT_SHOULD_BUILD_EMBEDDED_STDLIB)
178+
set(SWIFT_SHOULD_BUILD_EMBEDDED_CONCURRENCY TRUE)
179+
is_build_type_optimized("${SWIFT_STDLIB_BUILD_TYPE}" swift_optimized)
180+
if(NOT swift_optimized)
181+
set(SWIFT_SHOULD_BUILD_EMBEDDED_CONCURRENCY FALSE)
182+
endif()
183+
if(SWIFT_SHOULD_BUILD_EMBEDDED_STDLIB AND SWIFT_SHOULD_BUILD_EMBEDDED_CONCURRENCY)
181184
add_custom_target(embedded-concurrency ALL)
182185

183186
set(SWIFT_ENABLE_REFLECTION OFF)

0 commit comments

Comments
 (0)