File tree Expand file tree Collapse file tree 2 files changed +15
-9
lines changed Expand file tree Collapse file tree 2 files changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -623,13 +623,6 @@ if(NOT EXISTS "${SWIFT_PATH_TO_SWIFT_SYNTAX_SOURCE}")
623
623
message (SEND_ERROR "swift-syntax is required to build the Swift compiler. Please run update-checkout or specify SWIFT_PATH_TO_SWIFT_SYNTAX_SOURCE" )
624
624
endif ()
625
625
626
- # Use dispatch as the system scheduler by default.
627
- # For convenience, we set this to false when concurrency is disabled.
628
- set (SWIFT_CONCURRENCY_USES_DISPATCH FALSE )
629
- if (SWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY AND "${SWIFT_CONCURRENCY_GLOBAL_EXECUTOR} " STREQUAL "dispatch" )
630
- set (SWIFT_CONCURRENCY_USES_DISPATCH TRUE )
631
- endif ()
632
-
633
626
set (SWIFT_BUILD_HOST_DISPATCH FALSE )
634
627
if (SWIFT_ENABLE_DISPATCH AND NOT CMAKE_SYSTEM_NAME STREQUAL Darwin )
635
628
# Only build libdispatch for the host if the host tools are being built and
@@ -638,9 +631,9 @@ if(SWIFT_ENABLE_DISPATCH AND NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
638
631
set (SWIFT_BUILD_HOST_DISPATCH TRUE )
639
632
endif ()
640
633
641
- if (SWIFT_BUILD_HOST_DISPATCH OR SWIFT_CONCURRENCY_USES_DISPATCH )
634
+ if (SWIFT_BUILD_HOST_DISPATCH )
642
635
if (NOT EXISTS "${SWIFT_PATH_TO_LIBDISPATCH_SOURCE} " )
643
- message (SEND_ERROR "SourceKit and concurrency require libdispatch on non-Darwin hosts. Please specify SWIFT_PATH_TO_LIBDISPATCH_SOURCE" )
636
+ message (SEND_ERROR "SourceKit requires libdispatch on non-Darwin hosts. Please specify SWIFT_PATH_TO_LIBDISPATCH_SOURCE" )
644
637
endif ()
645
638
endif ()
646
639
endif ()
Original file line number Diff line number Diff line change @@ -228,3 +228,16 @@ option(SWIFT_STDLIB_CONCURRENCY_TRACING
228
228
"Enable concurrency tracing in the runtime; assumes the presence of os_log(3)
229
229
and the os_signpost(3) API."
230
230
"${SWIFT_STDLIB_CONCURRENCY_TRACING_default} " )
231
+
232
+ # Use dispatch as the system scheduler by default.
233
+ # For convenience, we set this to false when concurrency is disabled.
234
+ set (SWIFT_CONCURRENCY_USES_DISPATCH FALSE )
235
+ if (SWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY AND "${SWIFT_CONCURRENCY_GLOBAL_EXECUTOR} " STREQUAL "dispatch" )
236
+ set (SWIFT_CONCURRENCY_USES_DISPATCH TRUE )
237
+ endif ()
238
+
239
+ if (SWIFT_CONCURRENCY_USES_DISPATCH )
240
+ if (NOT EXISTS "${SWIFT_PATH_TO_LIBDISPATCH_SOURCE} " )
241
+ message (SEND_ERROR "Concurrency requires libdispatch on non-Darwin hosts. Please specify SWIFT_PATH_TO_LIBDISPATCH_SOURCE" )
242
+ endif ()
243
+ endif ()
You can’t perform that action at this time.
0 commit comments