-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Don't include support for old mangling in runtimes without ObjC interop #39675
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
Don't include support for old mangling in runtimes without ObjC interop #39675
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could see an argument for this being something that you could control rather than associating this with the stable ABI. Id like to see Windows aim for a stable ABI at some point, and wouldn't want to include the old decoration schemes since it pre-dated the cut point. I don't think that adding in the option needs to hold up this change though.
@swift-ci please test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make this conditional on ObjC interop rather than the stable ABI? ObjC is why we keep the old mangling around, so that would probably make more sense. I'm fine with adjusting that later if you prefer, though.
d21d934
to
561621a
Compare
@swift-ci please test |
Well, the interesting thing is that ObjC interop is not a build time constant - it is a runtime value ( |
561621a
to
c6b19d2
Compare
Build failed |
@swift-ci please test |
preset=stdlib_S_standalone_minimal_macho_x86_64,build,test |
@swift-ci please test Windows platform |
It's both, right? ObjC interop is enabled or disabled in the stdlib at build time, and then you can override the default when building a program. I don't think we really support mismatched values, though. The flag seems to be there so the frontend doesn't have to embed the knowledge of which targets support ObjC interop, and for use by codegen tests. |
@mikeash yes, and I think that this change moves to actually clean that up. The sinking of the option to the stdlib makes this better. The demangler is in lib/ rather than stdlib/ which is what I think is making me uncomfortable (the way that things are phrased). I think that the change itself is fine now. |
This saves a surprising amount of codesize in the runtime (~25 kB on x86_64).