mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-15 20:45:45 +03:00
9b67cba4f6
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
18 lines
554 B
Rust
18 lines
554 B
Rust
use crate::spec::{FramePointer, RelroLevel, TargetOptions};
|
|
|
|
pub fn opts() -> TargetOptions {
|
|
TargetOptions {
|
|
os: "openbsd".to_string(),
|
|
dynamic_linking: true,
|
|
executables: true,
|
|
families: vec!["unix".to_string()],
|
|
has_rpath: true,
|
|
abi_return_struct_as_int: true,
|
|
position_independent_executables: true,
|
|
frame_pointer: FramePointer::Always, // FIXME 43575: should be MayOmit...
|
|
relro_level: RelroLevel::Full,
|
|
dwarf_version: Some(2),
|
|
..Default::default()
|
|
}
|
|
}
|