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 @@ -700,13 +700,6 @@ if(NOT EXISTS "${SWIFT_PATH_TO_SWIFT_SYNTAX_SOURCE}")
700
700
message (SEND_ERROR "swift-syntax is required to build the Swift compiler. Please run update-checkout or specify SWIFT_PATH_TO_SWIFT_SYNTAX_SOURCE" )
701
701
endif ()
702
702
703
- # Use dispatch as the system scheduler by default.
704
- # For convenience, we set this to false when concurrency is disabled.
705
- set (SWIFT_CONCURRENCY_USES_DISPATCH FALSE )
706
- if (SWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY AND "${SWIFT_CONCURRENCY_GLOBAL_EXECUTOR} " STREQUAL "dispatch" )
707
- set (SWIFT_CONCURRENCY_USES_DISPATCH TRUE )
708
- endif ()
709
-
710
703
set (SWIFT_BUILD_HOST_DISPATCH FALSE )
711
704
if (SWIFT_ENABLE_DISPATCH AND NOT CMAKE_SYSTEM_NAME STREQUAL Darwin )
712
705
# Only build libdispatch for the host if the host tools are being built and
@@ -715,9 +708,9 @@ if(SWIFT_ENABLE_DISPATCH AND NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
715
708
set (SWIFT_BUILD_HOST_DISPATCH TRUE )
716
709
endif ()
717
710
718
- if (SWIFT_BUILD_HOST_DISPATCH OR SWIFT_CONCURRENCY_USES_DISPATCH )
711
+ if (SWIFT_BUILD_HOST_DISPATCH )
719
712
if (NOT EXISTS "${SWIFT_PATH_TO_LIBDISPATCH_SOURCE} " )
720
- message (SEND_ERROR "SourceKit and concurrency require libdispatch on non-Darwin hosts. Please specify SWIFT_PATH_TO_LIBDISPATCH_SOURCE" )
713
+ message (SEND_ERROR "SourceKit requires libdispatch on non-Darwin hosts. Please specify SWIFT_PATH_TO_LIBDISPATCH_SOURCE" )
721
714
endif ()
722
715
endif ()
723
716
endif ()
Original file line number Diff line number Diff line change @@ -239,3 +239,16 @@ set(SWIFT_RUNTIME_FIXED_BACKTRACER_PATH "" CACHE STRING
239
239
"If set, provides a fixed path to the swift-backtrace binary. This
240
240
will disable dynamic determination of the path and will also disable
241
241
the setting in SWIFT_BACKTRACE." )
242
+
243
+ # Use dispatch as the system scheduler by default.
244
+ # For convenience, we set this to false when concurrency is disabled.
245
+ set (SWIFT_CONCURRENCY_USES_DISPATCH FALSE )
246
+ if (SWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY AND "${SWIFT_CONCURRENCY_GLOBAL_EXECUTOR} " STREQUAL "dispatch" )
247
+ set (SWIFT_CONCURRENCY_USES_DISPATCH TRUE )
248
+ endif ()
249
+
250
+ if (SWIFT_CONCURRENCY_USES_DISPATCH )
251
+ if (NOT EXISTS "${SWIFT_PATH_TO_LIBDISPATCH_SOURCE} " )
252
+ message (SEND_ERROR "Concurrency require libdispatch on non-Darwin hosts. Please specify SWIFT_PATH_TO_LIBDISPATCH_SOURCE" )
253
+ endif ()
254
+ endif ()
You can’t perform that action at this time.
0 commit comments