Skip to content

[5.9][Runtime] Redeclare _dyld_lookup_section_info as weak, don't use enum _dyld_section_location_kind. #68040

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 Aug 21, 2023

This is a cherry-pick #64042 and #64735 from main to release/5.9. This fixes two issues with _dyld_section_location_kind by redeclaring it as weak and avoiding enum _dyld_section_location_kind.

rdar://113916355

If the SDK has dyld_priv.h but doesn't have enum _dyld_section_location_kind, we can't use enum _dyld_section_location_kind and it's hard to detect that. Instead, just use `int`, and use #defines for the values.

(cherry picked from commit f7e3256)
This lets us build against it and still run on systems without it.

(cherry picked from commit e439d27)
@mikeash mikeash requested a review from a team as a code owner August 21, 2023 17:37
@mikeash
Copy link
Contributor Author

mikeash commented Aug 21, 2023

@swift-ci please test

@mikeash
Copy link
Contributor Author

mikeash commented Aug 21, 2023

@swift-ci please test windows platform

1 similar comment
@mikeash
Copy link
Contributor Author

mikeash commented Aug 22, 2023

@swift-ci please test windows platform

@mikeash mikeash merged commit 46ebb9d into swiftlang:release/5.9 Aug 23, 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