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 @@ -691,13 +691,6 @@ if(NOT EXISTS "${SWIFT_PATH_TO_SWIFT_SYNTAX_SOURCE}")
691
691
message (SEND_ERROR "swift-syntax is required to build the Swift compiler. Please run update-checkout or specify SWIFT_PATH_TO_SWIFT_SYNTAX_SOURCE" )
692
692
endif ()
693
693
694
- # Use dispatch as the system scheduler by default.
695
- # For convenience, we set this to false when concurrency is disabled.
696
- set (SWIFT_CONCURRENCY_USES_DISPATCH FALSE )
697
- if (SWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY AND "${SWIFT_CONCURRENCY_GLOBAL_EXECUTOR} " STREQUAL "dispatch" )
698
- set (SWIFT_CONCURRENCY_USES_DISPATCH TRUE )
699
- endif ()
700
-
701
694
set (SWIFT_BUILD_HOST_DISPATCH FALSE )
702
695
if (SWIFT_ENABLE_DISPATCH AND NOT CMAKE_SYSTEM_NAME STREQUAL Darwin )
703
696
# Only build libdispatch for the host if the host tools are being built and
@@ -706,9 +699,9 @@ if(SWIFT_ENABLE_DISPATCH AND NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
706
699
set (SWIFT_BUILD_HOST_DISPATCH TRUE )
707
700
endif ()
708
701
709
- if (SWIFT_BUILD_HOST_DISPATCH OR SWIFT_CONCURRENCY_USES_DISPATCH )
702
+ if (SWIFT_BUILD_HOST_DISPATCH )
710
703
if (NOT EXISTS "${SWIFT_PATH_TO_LIBDISPATCH_SOURCE} " )
711
- message (SEND_ERROR "SourceKit and concurrency require libdispatch on non-Darwin hosts. Please specify SWIFT_PATH_TO_LIBDISPATCH_SOURCE" )
704
+ message (SEND_ERROR "SourceKit requires libdispatch on non-Darwin hosts. Please specify SWIFT_PATH_TO_LIBDISPATCH_SOURCE" )
712
705
endif ()
713
706
endif ()
714
707
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