Add support for leaf fn frame pointer elimination
This PR adds ability for the target specifications to specify frame pointer emission type that's not just “always” or “whatever cg decides”. In particular there's a new mode that allows omission of the frame pointer for leaf functions (those that don't call any other functions). We then set this new mode for Aarch64-based Apple targets. Fixes #86196
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
use crate::spec::{PanicStrategy, RelocModel, RelroLevel, StackProbeType, TargetOptions};
|
||||
use crate::spec::TargetOptions;
|
||||
use crate::spec::{FramePointer, PanicStrategy, RelocModel, RelroLevel, StackProbeType};
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
TargetOptions {
|
||||
@@ -7,7 +8,7 @@ pub fn opts() -> TargetOptions {
|
||||
panic_strategy: PanicStrategy::Abort,
|
||||
// don't use probe-stack=inline-asm until rust#83139 and rust#84667 are resolved
|
||||
stack_probes: StackProbeType::Call,
|
||||
eliminate_frame_pointer: false,
|
||||
frame_pointer: FramePointer::Always,
|
||||
position_independent_executables: true,
|
||||
needs_plt: true,
|
||||
relro_level: RelroLevel::Full,
|
||||
|
||||
Reference in New Issue
Block a user