Skip to content

Commit 7fe0e40

Browse files
committed
[Regex] Build _RegexParser without resilience
_RegexParser does not need resilience as it's only ever going to be used by _StringProcessing and RegexBuilder. It's version-locked with its dependent modules. Resolves rdar://93067204.
1 parent 8b19bae commit 7fe0e40

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

stdlib/public/RegexParser/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ foreach(source ${_MATCHING_ENGINE_SOURCES})
2222
endforeach()
2323
message(STATUS "Using Experimental String Processing library for _RegexParser (${EXPERIMENTAL_STRING_PROCESSING_SOURCE_DIR}).")
2424

25+
set(SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS_NO_RESILIENCE)
26+
string(REGEX REPLACE "-enable-library-evolution" ""
27+
SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS_NO_RESILIENCE
28+
"${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS}")
29+
2530
add_swift_target_library(swift_RegexParser ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_STDLIB
2631
"${MATCHING_ENGINE_SOURCES}"
2732

@@ -37,7 +42,7 @@ add_swift_target_library(swift_RegexParser ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} I
3742
C_COMPILE_FLAGS
3843
-Dswift_RegexParser_EXPORTS
3944
SWIFT_COMPILE_FLAGS
40-
${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS}
45+
${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS_NO_RESILIENCE}
4146
# Workaround until `_RegexParser` is imported as implementation-only
4247
# by `_StringProcessing`.
4348
-Xfrontend -disable-implicit-string-processing-module-import

0 commit comments

Comments
 (0)