-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Add @_weakSymbol and a corresponding SIL attribute #14660
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
Add @_weakSymbol and a corresponding SIL attribute #14660
Conversation
@swift-ci Please test |
I realized later that making this work with availability would probably be sufficient, since the runtime has a hook to pretend that it's on a certain version of a platform. But it's still simpler to just mark things as "weak". |
Build failed |
Build failed |
a8ee4eb
to
06d8a4d
Compare
06d8a4d
to
3066da2
Compare
@swift-ci Please test |
Build failed |
Build failed |
*sigh* |
3066da2
to
cc746ac
Compare
@swift-ci Please test |
1 similar comment
@swift-ci Please test |
Build failed |
Build failed |
Uncyclopedia‘s article for “weak symbol” is about the other definition of weak that we don’t mean here: https://en.m.wikipedia.org/wiki/Weak_symbol I hate to bikeshed an internal only name, but since confusion is likely here something else might be called for. |
Anything suspect on the technical side? |
(The equivalent GCC attribute is spelled |
|
...for no other reason than to slightly improve compile times when something changes in SILModule.h or SILFunction.h.
And make it less likely to happen again in the future.
This is mostly intended to be used for testing at this point; in the long run, we want to be using availability information to decide whether to weak-link something or not. You'll notice a bunch of FIXMEs in the test case that we may not need now, but will probably need to handle in the future. Groundwork for doing backward-deployment execution tests.
cc746ac
to
bb33977
Compare
@swift-ci Please smoke test |
@swift-ci Please smoke test Linux |
This is mostly intended to be used for testing at this point; in the long run, we want to be using availability information to decide whether to weak-link something or not. You'll notice a bunch of FIXMEs in the test case that we may not need now, but will probably need to handle in the future.
I snuck in a few cleanups while I was here, too.
Groundwork for doing backward-deployment execution tests.