The rustc book indicates that
The default behaviour, if frame pointers are not force-enabled, depends on the target
What is the default behavior on linux, and how can I find the default value for all targets?
CodePudding user response:
Having a look through the rustc-code, it looks as linux is defaulted to FramePointer::MayOmit
Allows the machine code generator to omit the frame pointers. This option does not guarantee that the frame pointers will be omitted.
This corresponds to llvm's frame-pointer
function attribute with a value of none
. So it leaves it up to llvm to decide on a per-function basis.
You can see all the platform defaults in rust/src/librustc_target/spec/.