Skip to content

[5.10][Runtime] Add option to remove override point for retain/release. #70045

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

Conversation

mikeash
Copy link
Contributor

@mikeash mikeash commented Nov 27, 2023

Cherry-pick of #69542 to release/5.10.

Add a SWIFT_STDLIB_OVERRIDABLE_RETAIN_RELEASE CMake option. When set to true, swift_retain/release and the other functions in InstrumentsSupport.h can be overridden by setting the appropriate global function pointer, as is already the case. When set to false, those function pointers are removed and the functions always go into the default implementation.

Set SWIFT_STDLIB_OVERRIDABLE_RETAIN_RELEASE to false when building the minimal stdlib, and set it to true otherwise by default.

rdar://115987924

Add a `SWIFT_STDLIB_OVERRIDABLE_RETAIN_RELEASE` CMake option. When set to true, swift_retain/release and the other functions in InstrumentsSupport.h can be overridden by setting the appropriate global function pointer, as is already the case. When set to false, those function pointers are removed and the functions always go into the default implementation.

Set `SWIFT_STDLIB_OVERRIDABLE_RETAIN_RELEASE` to false when building the minimal stdlib, and set it to true otherwise by default.

rdar://115987924
(cherry picked from commit 6606850)
@mikeash mikeash requested a review from a team as a code owner November 27, 2023 20:38
@mikeash
Copy link
Contributor Author

mikeash commented Nov 27, 2023

@swift-ci please test

@mikeash mikeash enabled auto-merge November 27, 2023 20:48
@mikeash mikeash merged commit 72576b7 into swiftlang:release/5.10 Nov 28, 2023
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