Skip to content

[CMake] Disable Regex literal when Swift parser integration is disabled #69971

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,6 @@ option(SWIFT_BUILD_PERF_TESTSUITE
"Create in-tree targets for building swift performance benchmarks."
FALSE)

option(SWIFT_BUILD_REGEX_PARSER_IN_COMPILER
"Build the Swift regex parser as part of the compiler."
TRUE)

option(SWIFT_INCLUDE_TESTS "Create targets for building/running tests." TRUE)

option(SWIFT_INCLUDE_TEST_BINARIES
Expand Down Expand Up @@ -721,6 +717,14 @@ option(SWIFT_BUILD_SWIFT_SYNTAX
"Enable building swift syntax"
FALSE)

option(SWIFT_BUILD_REGEX_PARSER_IN_COMPILER
"Build the Swift regex parser as part of the compiler."
TRUE)
if(SWIFT_BUILD_REGEX_PARSER_IN_COMPILER AND NOT SWIFT_BUILD_SWIFT_SYNTAX)
message(WARNING "Force setting SWIFT_BUILD_REGEX_PARSER_IN_COMPILER=OFF because Swift parser integration is disabled")
set(SWIFT_BUILD_REGEX_PARSER_IN_COMPILER OFF)
endif()

set(SWIFT_BUILD_HOST_DISPATCH FALSE)
if(SWIFT_ENABLE_DISPATCH AND NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin")
# Only build libdispatch for the host if the host tools are being built and
Expand Down