Skip to content

Commit 3836662

Browse files
authored
Merge pull request #72315 from tshortli/revert-regex-parser-resilience
Revert "[Regex] Really build _RegexParser without resilience."
2 parents 1a63c3a + 841847b commit 3836662

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

stdlib/public/RegexParser/CMakeLists.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@ foreach(source ${_MATCHING_ENGINE_SOURCES})
2222
endforeach()
2323
message(STATUS "Using Experimental String Processing library for _RegexParser (${SWIFT_PATH_TO_STRING_PROCESSING_SOURCE}).")
2424

25-
# The parser module can be fragile (does not use library evolution) because its
26-
# only dependents are _StringProcessing and RegexBuilder and it's version-locked
27-
# with those modules.
28-
add_swift_target_library(swift_RegexParser ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_STDLIB IS_FRAGILE
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+
30+
add_swift_target_library(swift_RegexParser ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_STDLIB
2931
"${MATCHING_ENGINE_SOURCES}"
3032

3133
SWIFT_MODULE_DEPENDS_LINUX Glibc
@@ -40,6 +42,7 @@ add_swift_target_library(swift_RegexParser ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} I
4042
C_COMPILE_FLAGS
4143
-Dswift_RegexParser_EXPORTS
4244
SWIFT_COMPILE_FLAGS
45+
${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS_NO_RESILIENCE}
4346
# Workaround until `_RegexParser` is imported as implementation-only
4447
# by `_StringProcessing`.
4548
-Xfrontend -disable-implicit-string-processing-module-import

validation-test/ParseableInterface/verify_all_overlays.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@
5050
]:
5151
continue
5252

53-
# These modules are built without library evolution and don't have a
53+
# Cxx and CxxStdlib are built without library evolution and don't have a
5454
# .swiftinterface file
55-
if module_name in ["Cxx", "CxxStdlib", "_RegexParser"]:
55+
if module_name in ["Cxx", "CxxStdlib"]:
5656
if not os.path.exists(interface_file):
5757
continue
5858

0 commit comments

Comments
 (0)