Skip to content

[Regex] Really build _RegexParser without resilience #70953

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
Jan 17, 2024
Merged
Show file tree
Hide file tree
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
11 changes: 4 additions & 7 deletions stdlib/public/RegexParser/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,10 @@ foreach(source ${_MATCHING_ENGINE_SOURCES})
endforeach()
message(STATUS "Using Experimental String Processing library for _RegexParser (${SWIFT_PATH_TO_STRING_PROCESSING_SOURCE}).")

set(SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS_NO_RESILIENCE)
string(REGEX REPLACE "-enable-library-evolution" ""
SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS_NO_RESILIENCE
"${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS}")

add_swift_target_library(swift_RegexParser ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_STDLIB
# The parser module can be fragile (does not use library evolution) because its
# only dependents are _StringProcessing and RegexBuilder and it's version-locked
# with those modules.
add_swift_target_library(swift_RegexParser ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_STDLIB IS_FRAGILE
"${MATCHING_ENGINE_SOURCES}"

SWIFT_MODULE_DEPENDS_LINUX Glibc
Expand All @@ -42,7 +40,6 @@ add_swift_target_library(swift_RegexParser ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} I
C_COMPILE_FLAGS
-Dswift_RegexParser_EXPORTS
SWIFT_COMPILE_FLAGS
${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS_NO_RESILIENCE}
# Workaround until `_RegexParser` is imported as implementation-only
# by `_StringProcessing`.
-Xfrontend -disable-implicit-string-processing-module-import
Expand Down
4 changes: 2 additions & 2 deletions validation-test/ParseableInterface/verify_all_overlays.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
]:
continue

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

Expand Down