-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Frontend][AST][IRGen] Improve availability support. #71213
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
4179e56
to
1e8622a
Compare
@swift-ci Please smoke test |
Just to explain the motivation for this, I want to make a change to how the C++ interop exception handling support works, such that we get backtraces from the site of the C++ |
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.
Very nice, I like this!
Do I understand correctly that this PR contains of two separate features:
- the new mechanism in the compiler for availability checking
- passing the runtime version via build-script when building the compiler
(maybe worth splitting in two commits)
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.
Those .def files make everything so much nicer now.
Yes. I suppose there are logically three pieces:
I guess I could split it into three commits maybe to cover those? |
Use `.def` files to generate code for feature availability and runtime version to OS version mappings. rdar://121522431
Add a `-min-runtime-version` option that can be used to avoid problems when building on Linux and Windows where because the runtime isn't part of the OS, availability doesn't solve the problem of trying to build the compiler against an older runtime. Also add functions to IRGen to make it easy to test feature availability using both the runtime version and the existing Darwin availability support. rdar://121522431
Turn on the use of `-min-runtime-version` when building the compiler. rdar://121522431
1e8622a
to
e48b05f
Compare
OK, I've broken it up into three separate commits. |
@swift-ci Please smoke test |
I've also just realised that I somehow accidentally removed the code owners from the review list. I don't believe I did that myself, mind — it happened when I promoted this PR from a draft. Given that I'm tinkering with the availability code here, it's worth anyone interested taking a glance. |
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.
Nice, this seems like a big improvement.
This was just updated in swiftlang#71297. rdar://121522431
@swift-ci Please smoke test |
Use .def files to generate code for feature availability and runtime version to OS version mappings.
Also add a min-runtime-version option that can be used to avoid problems when building on Linux and Windows where because the runtime isn't part of the OS, availability doesn't solve the problem of trying to build the compiler against an older runtime.
Added some functions to IRGen to help with that problem; essentially we test both the deployment target availability and the new runtime version based availability.
rdar://121522431