-
Notifications
You must be signed in to change notification settings - Fork 501
allow overriding frame pointer defaults #441
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
I've personally used this before because frame pointers assist in profiling by making stack traces easier for some tools (like |
I was actually comparing a rust program in After sending the request I noticed rustc now has: -C force-frame-pointers=yes|no |
Yeah if we could infer from |
I did have a bit of a look at this, the only thing that would inhibit this from being straight forward argument parsing is the unstable feature Implement argsfile, depending on the compiler version we may have to chase the options around the filesystem. In many ways, it seems like an ugly hack of using serde in the compiler to serialize some struct containing all of the options, and setting that in an environment variable would be really nice. |
Failing auto-inference of an option, having a separate config for this crate seems reasonable. Not a great UI, but gets the job done. |
This probably needs some work in specifying the option for other compilers besides gcc/clang. |
Looks great to me, no need to worry about the CI errors, thanks! |
When using a Cargo.toml such containing:
cc-rs will automatically add -fno-omit-frame-pointer which affects code generation,
in my opinion there should be a way to enable debug info, without affecting the resulting code generation.
This patch attempts to do so, by only adding -fno-omit-frame-pointer if the target profile is debug
rather than if debuginfo is enabled. I imagine it's somewhat debatable the right way to make this possible.