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

Conversation

tshortli
Copy link
Contributor

@tshortli tshortli commented Jan 17, 2024

This was originally attempted with #58810 but _RegexParser still ended up being built with library evolution enabled because the -enable-library-evolution flag is added to the command line after calling add_swift_target_library and therefore stripping the flag out of SWIFT_COMPILE_FLAGS does nothing.

The IS_FRAGILE flag was introduced to support building C++ interop overlay modules without library evolution and it can now be used to prevent _RegexParser from being built with library evolution.

Resolves rdar://93067204

@tshortli tshortli requested a review from a team as a code owner January 17, 2024 05:19
@tshortli
Copy link
Contributor Author

My real motivation for fixing this out of the blue is to resolve the dozens of warnings like this that we see every time we build the compiler and standard libraries:

.../swift/swift-project/swift-experimental-string-processing/Sources/_StringProcessing/ByteCodeGen.swift:147:5: warning: switch covers known cases, but 'AST.Reference.Kind' may have additional unknown values
    switch ref.kind {
    ^

@tshortli tshortli force-pushed the fragile-regex-parser-module branch from 67e766c to f3c3cb5 Compare January 17, 2024 05:28
@tshortli
Copy link
Contributor Author

@swift-ci please test

This was originally attempted with swiftlang#58810
but `_RegexParser` still ended up being built with library evolution enabled
because the `-enable-library-evolution` flag is added to the command line after
calling `add_swift_target_library` and therefore stripping the flag out of
`SWIFT_COMPILE_FLAGS` does nothing.

The `IS_FRAGILE` flag was introduced to support building C++ interop overlay
modules without library evolution and it can now be used to prevent
`_RegexParser` from being built with library evolution.

Resolves rdar://93067204
@tshortli tshortli force-pushed the fragile-regex-parser-module branch from f3c3cb5 to 8d1b578 Compare January 17, 2024 16:04
@tshortli
Copy link
Contributor Author

@swift-ci please test

@tshortli tshortli enabled auto-merge January 17, 2024 16:04
tshortli added a commit to tshortli/swift-installer-scripts that referenced this pull request Jan 17, 2024
@tshortli
Copy link
Contributor Author

swiftlang/swift-installer-scripts#274

@swift-ci please smoke test

@tshortli
Copy link
Contributor Author

swiftlang/swift-installer-scripts#274

@swift-ci please build toolchain macOS platform

@tshortli
Copy link
Contributor Author

swiftlang/swift-installer-scripts#274

@swift-ci please build toolchain Windows platform

@tshortli tshortli merged commit c06d3ce into swiftlang:main Jan 17, 2024
@tshortli tshortli deleted the fragile-regex-parser-module branch January 17, 2024 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants