Skip to content

Commit 8ef2fa2

Browse files
committed
[CMake] Disable Regex literal when Swift parser integration is disabled
Regex literal parsing is now built as a part of ASTGen, that requires host toolchain and swift-syntax integration. (cherry picked from commit ee982fd)
1 parent 1d95d69 commit 8ef2fa2

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

CMakeLists.txt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,10 +270,6 @@ option(SWIFT_BUILD_PERF_TESTSUITE
270270
"Create in-tree targets for building swift performance benchmarks."
271271
FALSE)
272272

273-
option(SWIFT_BUILD_REGEX_PARSER_IN_COMPILER
274-
"Build the Swift regex parser as part of the compiler."
275-
TRUE)
276-
277273
option(SWIFT_INCLUDE_TESTS "Create targets for building/running tests." TRUE)
278274

279275
option(SWIFT_INCLUDE_TEST_BINARIES
@@ -696,6 +692,14 @@ option(SWIFT_BUILD_SWIFT_SYNTAX
696692
"Enable building swift syntax"
697693
FALSE)
698694

695+
option(SWIFT_BUILD_REGEX_PARSER_IN_COMPILER
696+
"Build the Swift regex parser as part of the compiler."
697+
TRUE)
698+
if(SWIFT_BUILD_REGEX_PARSER_IN_COMPILER AND NOT SWIFT_BUILD_SWIFT_SYNTAX)
699+
message(WARNING "Force setting SWIFT_BUILD_REGEX_PARSER_IN_COMPILER=OFF because Swift parser integration is disabled")
700+
set(SWIFT_BUILD_REGEX_PARSER_IN_COMPILER OFF)
701+
endif()
702+
699703
set(SWIFT_BUILD_HOST_DISPATCH FALSE)
700704
if(SWIFT_ENABLE_DISPATCH AND NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin")
701705
# Only build libdispatch for the host if the host tools are being built and

0 commit comments

Comments
 (0)