Skip to content

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

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
Nov 9, 2023

Conversation

mikeash
Copy link
Contributor

@mikeash mikeash commented Oct 31, 2023

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

@mikeash mikeash requested a review from a team as a code owner October 31, 2023 18:55
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
@mikeash mikeash force-pushed the retain-release-override-optional branch from a9711c0 to 6606850 Compare October 31, 2023 19:26
@mikeash
Copy link
Contributor Author

mikeash commented Nov 1, 2023

@swift-ci please test

@mikeash
Copy link
Contributor Author

mikeash commented Nov 8, 2023

@swift-ci please test

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.

4 participants