-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 support for -Cforce-frame-poiners=non-leaf #125127
Conversation
Some changes occurred in compiler/rustc_codegen_cranelift cc @bjorn3 |
Doesn't #124733 try to do this already? |
This brings the command-line option up to parity with the frame-pointers field in the json target specs.
3be218c
to
3112454
Compare
Yes, I'm sorry @jsgf but I believe my PR already completely supersedes yours, which would require all the additional bits that mine handles (namely, landing behind |
I suppose I didn't add the "always" option, I would be happy to include that. |
3112454
to
49ea4e2
Compare
I believe the "never" option is confusing as it suggests we will not force frame pointers or that we will force-them-to-not-occur, but we do demand frame pointers from the backend when it is required for ABI compliance, and not allowing people to turn this off is quite intentional as I understand it, as then it breaks important elements of runtime support. |
@workingjubilee @jieyouxu Oh yeah, looks like it. I guess I should have done a search. Like you I was surprised this wasn't already an option. |
Yeah I was in two minds about this - the alternative is to just reflect the "MayOmit" terminology from the enum |
fp = FramePointer::Always; | ||
match (opts.unstable_opts.instrument_mcount, opts.cg.force_frame_pointers) { | ||
(true, _) => fp = FramePointer::Always, | ||
(_, Some(fp_opt)) => fp = fp_opt, |
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.
This changes the behavior. The code did not previously override the value of fp
if force_frame_pointers
was Some(false)
.
This brings the command-line option up to parity with the frame-pointers field in the json target specs. It's still backwards compatible with before but now also accepts
always
,never
andnon-leaf
.