Skip to content

[5.9] [Immediate] Workaround for loading merged frameworks in immediate mode #66564

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
Jun 12, 2023

Conversation

benlangmuir
Copy link
Contributor

  • Explanation: Some frameworks (e.g. AppKit) that previously had a separate swift overlay have been merged in the beta macOS 14 SDK. This caused missing symbol errors in swift immediate mode when targetting an older OS with a new SDK, because we do not currently support ld$previous mappings for symbols in JITLink. This commit extends an existing workaround previously used for Foundation to cover additional frameworks by automatically pulling in the overlay libswift library on older OSes.
  • Risk: Low. Only affects immediate mode. Only affects specific frameworks that are already missing symbols in Swift.
  • Testing: Manually on a macOS 13 host using a 14 beta SDK; for each framework I found a symbol that migrated and ensured it did not cause JIT errors after this change.
  • Issue: rdar://110371405
  • Reviewer: @mikeash

Some frameworks that previously had a separate swift overlay have been merged in macOS 14. This is causing symbols to not resolve if using the new SDK but running on an older OS in immediate mode. Ideally we would handle this automatically in JITLink as is done by the system linker, but in the meantime add a workaround to load the correct libraries manually.

rdar://110371405
(cherry picked from commit e759007)

Some frameworks that previously had a separate swift overlay have been
merged in macOS 14. This is causing symbols to not resolve if using the
new SDK but running on an older OS in immediate mode. Ideally we would
handle this automatically in JITLink as is done by the system linker,
but in the meantime add a workaround to load the correct libraries
manually.

rdar://110371405
(cherry picked from commit e759007)
@benlangmuir benlangmuir added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.9 labels Jun 12, 2023
@benlangmuir benlangmuir requested a review from a team as a code owner June 12, 2023 17:12
@benlangmuir
Copy link
Contributor Author

@swift-ci please test

@benlangmuir
Copy link
Contributor Author

@swift-ci please nominate

@benlangmuir benlangmuir merged commit 7e24b8b into swiftlang:release/5.9 Jun 12, 2023
@benlangmuir benlangmuir deleted the immediate branch June 12, 2023 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.9
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants