Enable non-leaf Frame Pointers for mingw-w64 Arm64 Windows
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use crate::spec::{Target, TargetMetadata, base};
|
||||
use crate::spec::{FramePointer, Target, TargetMetadata, base};
|
||||
|
||||
pub(crate) fn target() -> Target {
|
||||
let mut base = base::windows_gnullvm::opts();
|
||||
@@ -6,6 +6,12 @@ pub(crate) fn target() -> Target {
|
||||
base.features = "+v8a,+neon,+fp-armv8".into();
|
||||
base.linker = Some("aarch64-w64-mingw32-clang".into());
|
||||
|
||||
// Microsoft recommends enabling frame pointers on Arm64 Windows.
|
||||
// From https://learn.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions?view=msvc-170#integer-registers
|
||||
// "The frame pointer (x29) is required for compatibility with fast stack walking used by ETW
|
||||
// and other services. It must point to the previous {x29, x30} pair on the stack."
|
||||
base.frame_pointer = FramePointer::NonLeaf;
|
||||
|
||||
Target {
|
||||
llvm_target: "aarch64-pc-windows-gnu".into(),
|
||||
metadata: TargetMetadata {
|
||||
|
||||
Reference in New Issue
Block a user