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}")
691691 message (SEND_ERROR "swift-syntax is required to build the Swift compiler. Please run update-checkout or specify SWIFT_PATH_TO_SWIFT_SYNTAX_SOURCE" )
692692endif ()
693693
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-
701694set (SWIFT_BUILD_HOST_DISPATCH FALSE )
702695if (SWIFT_ENABLE_DISPATCH AND NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
703696 # 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)
706699 set (SWIFT_BUILD_HOST_DISPATCH TRUE )
707700 endif ()
708701
709- if (SWIFT_BUILD_HOST_DISPATCH OR SWIFT_CONCURRENCY_USES_DISPATCH )
702+ if (SWIFT_BUILD_HOST_DISPATCH)
710703 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" )
712705 endif ()
713706 endif ()
714707endif ()
Original file line number Diff line number Diff line change @@ -239,3 +239,16 @@ set(SWIFT_RUNTIME_FIXED_BACKTRACER_PATH "" CACHE STRING
239239 "If set, provides a fixed path to the swift-backtrace binary. This
240240 will disable dynamic determination of the path and will also disable
241241 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