Turn off frame pointer elimination on all Apple platforms.
This ends up disabling frame pointer elimination on aarch64_apple_darwin which matches what clang does by default along with the aarch64_apple_ios and x86_64_apple_darwin targets. Further, the Apple docs "Writing ARM64 Code for Apple Platforms" has a section called "Respect the Purpose of Specific CPU Registers" which specifically calls out the frame pointer register (x29): The frame pointer register (x29) must always address a valid frame record. Some functions — such as leaf functions or tail calls — may opt not to create an entry in this list As a result, stack traces are always meaningful, even without debug information. Other platforms are updated to not override the default.
This commit is contained in:
parent
ff2c947c00
commit
aab854596f
6 changed files with 1 additions and 5 deletions
|
@ -10,7 +10,6 @@ pub fn target() -> Target {
|
||||||
arch: "aarch64".to_string(),
|
arch: "aarch64".to_string(),
|
||||||
options: TargetOptions {
|
options: TargetOptions {
|
||||||
features: "+neon,+fp-armv8,+apple-a7".to_string(),
|
features: "+neon,+fp-armv8,+apple-a7".to_string(),
|
||||||
eliminate_frame_pointer: false,
|
|
||||||
max_atomic_width: Some(128),
|
max_atomic_width: Some(128),
|
||||||
unsupported_abis: super::arm_base::unsupported_abis(),
|
unsupported_abis: super::arm_base::unsupported_abis(),
|
||||||
forces_embed_bitcode: true,
|
forces_embed_bitcode: true,
|
||||||
|
|
|
@ -10,7 +10,6 @@ pub fn target() -> Target {
|
||||||
arch: "aarch64".to_string(),
|
arch: "aarch64".to_string(),
|
||||||
options: TargetOptions {
|
options: TargetOptions {
|
||||||
features: "+neon,+fp-armv8,+apple-a12".to_string(),
|
features: "+neon,+fp-armv8,+apple-a12".to_string(),
|
||||||
eliminate_frame_pointer: false,
|
|
||||||
max_atomic_width: Some(128),
|
max_atomic_width: Some(128),
|
||||||
unsupported_abis: super::arm_base::unsupported_abis(),
|
unsupported_abis: super::arm_base::unsupported_abis(),
|
||||||
forces_embed_bitcode: true,
|
forces_embed_bitcode: true,
|
||||||
|
|
|
@ -18,7 +18,6 @@ pub fn target() -> Target {
|
||||||
arch: "aarch64".to_string(),
|
arch: "aarch64".to_string(),
|
||||||
options: TargetOptions {
|
options: TargetOptions {
|
||||||
features: "+neon,+fp-armv8,+apple-a7".to_string(),
|
features: "+neon,+fp-armv8,+apple-a7".to_string(),
|
||||||
eliminate_frame_pointer: false,
|
|
||||||
max_atomic_width: Some(128),
|
max_atomic_width: Some(128),
|
||||||
unsupported_abis: super::arm_base::unsupported_abis(),
|
unsupported_abis: super::arm_base::unsupported_abis(),
|
||||||
forces_embed_bitcode: true,
|
forces_embed_bitcode: true,
|
||||||
|
|
|
@ -10,7 +10,6 @@ pub fn target() -> Target {
|
||||||
arch: "aarch64".to_string(),
|
arch: "aarch64".to_string(),
|
||||||
options: TargetOptions {
|
options: TargetOptions {
|
||||||
features: "+neon,+fp-armv8,+apple-a7".to_string(),
|
features: "+neon,+fp-armv8,+apple-a7".to_string(),
|
||||||
eliminate_frame_pointer: false,
|
|
||||||
max_atomic_width: Some(128),
|
max_atomic_width: Some(128),
|
||||||
unsupported_abis: super::arm_base::unsupported_abis(),
|
unsupported_abis: super::arm_base::unsupported_abis(),
|
||||||
forces_embed_bitcode: true,
|
forces_embed_bitcode: true,
|
||||||
|
|
|
@ -27,6 +27,7 @@ pub fn opts(os: &str) -> TargetOptions {
|
||||||
families: vec!["unix".to_string()],
|
families: vec!["unix".to_string()],
|
||||||
is_like_osx: true,
|
is_like_osx: true,
|
||||||
dwarf_version: Some(2),
|
dwarf_version: Some(2),
|
||||||
|
eliminate_frame_pointer: false,
|
||||||
has_rpath: true,
|
has_rpath: true,
|
||||||
dll_suffix: ".dylib".to_string(),
|
dll_suffix: ".dylib".to_string(),
|
||||||
archive_format: "darwin".to_string(),
|
archive_format: "darwin".to_string(),
|
||||||
|
|
|
@ -44,7 +44,6 @@ pub fn opts(os: &str, arch: Arch) -> TargetOptions {
|
||||||
executables: true,
|
executables: true,
|
||||||
link_env_remove: link_env_remove(arch),
|
link_env_remove: link_env_remove(arch),
|
||||||
has_elf_tls: false,
|
has_elf_tls: false,
|
||||||
eliminate_frame_pointer: false,
|
|
||||||
..super::apple_base::opts(os)
|
..super::apple_base::opts(os)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue