Skip to content

References to _swift_FORCE_LOAD* symbols should be weak #24259

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

Conversation

bob-wilson
Copy link
Contributor

Cherry-pick #24242 to swift-5.1-branch-04-24-2019
rdar://problem/50110036

When Swift always copied the overlay dylibs into app bundles, it was OK
for these symbol references to be non-weak, but with the overlays now
part of the OS on Apple platforms, we need to handle backward deployment
scenarios where a new overlay does not exist on an old OS version.
A weak reference will serve to pull in the overlay dylib if it exists,
without causing a fatal error if it does not. rdar://problem/50110036
@bob-wilson bob-wilson requested a review from a team as a code owner April 25, 2019 00:12
@bob-wilson
Copy link
Contributor Author

@swift-ci please test

PE/COFF does not provide weak import semantics.  Fallback to strong
import semantics on PE/COFF.
@bob-wilson
Copy link
Contributor Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 0db9b9c

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 0db9b9c

@bob-wilson bob-wilson merged commit 72d4f3c into swiftlang:swift-5.1-branch-04-24-2019 Apr 25, 2019
@bob-wilson bob-wilson deleted the rdar50110036-51-0424 branch April 25, 2019 21:34
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