Skip to content

Ensure Locked+Platform.swift is not stripped when statically linking. #1035

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
Mar 22, 2025

Conversation

grynspan
Copy link
Contributor

@grynspan grynspan commented Mar 21, 2025

All symbols in Locked+Platform.swift are referenced indirectly by the Swift compiler due to LockedWith being generic, which can cause symbols from that file (including protocol conformance metadata) to be stripped at link time as if it were unused. This change (hopefully) works around that issue.

Works around rdar://147250336.

Checklist:

  • Code and documentation should follow the style of the Style Guide.
  • If public symbols are renamed or modified, DocC references should be updated.

All symbols in Locked+Platform.swift are referenced _indirectly_ by the Swift
compiler due to `LockedWith` being generic, which can cause symbols from that
file (including protocol conformance metadata) to be stripped at link time as if
it were unused. This change (hopefully) works around that issue.

Works around rdar://147250336.
@grynspan grynspan added bug 🪲 Something isn't working concurrency 🔀 Swift concurrency/sendability issues workaround Workaround for an issue in another component (may need to revert later) embedded-swift 📟 Embedded Swift issues labels Mar 21, 2025
@grynspan grynspan added this to the Swift 6.2 milestone Mar 21, 2025
@grynspan grynspan self-assigned this Mar 21, 2025
@grynspan
Copy link
Contributor Author

@swift-ci test

@grynspan grynspan merged commit ee700e2 into main Mar 22, 2025
3 checks passed
@grynspan grynspan deleted the jgrynspan/statically-link-locked-platform branch March 22, 2025 17:08
grynspan added a commit that referenced this pull request Apr 4, 2025
grynspan added a commit that referenced this pull request Apr 5, 2025
Revert "Ensure `Locked+Platform.swift` is not stripped when statically linking. (#1035)"
@grynspan grynspan modified the milestones: Swift 6.2, Swift 6.x Apr 6, 2025
@stmontgomery stmontgomery modified the milestones: Swift 6.x, Swift 6.2 Apr 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working concurrency 🔀 Swift concurrency/sendability issues embedded-swift 📟 Embedded Swift issues workaround Workaround for an issue in another component (may need to revert later)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants