Skip to content

Commit 7b8253a

Browse files
authored
Unrolled build for #141815
Rollup merge of #141815 - mati865:mingw-aarch64-frame-pointers, r=workingjubilee Enable non-leaf Frame Pointers for mingw-w64 Arm64 Windows Based on #140828 I don't have AArch64 Windows to test it, but I trust LLVM to handle it well.
2 parents 852f15c + 7e9aee7 commit 7b8253a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

compiler/rustc_target/src/spec/targets/aarch64_pc_windows_gnullvm.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1-
use crate::spec::{Target, TargetMetadata, base};
1+
use crate::spec::{FramePointer, Target, TargetMetadata, base};
22

33
pub(crate) fn target() -> Target {
44
let mut base = base::windows_gnullvm::opts();
55
base.max_atomic_width = Some(128);
66
base.features = "+v8a,+neon,+fp-armv8".into();
77
base.linker = Some("aarch64-w64-mingw32-clang".into());
88

9+
// Microsoft recommends enabling frame pointers on Arm64 Windows.
10+
// From https://learn.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions?view=msvc-170#integer-registers
11+
// "The frame pointer (x29) is required for compatibility with fast stack walking used by ETW
12+
// and other services. It must point to the previous {x29, x30} pair on the stack."
13+
base.frame_pointer = FramePointer::NonLeaf;
14+
915
Target {
1016
llvm_target: "aarch64-pc-windows-gnu".into(),
1117
metadata: TargetMetadata {

0 commit comments

Comments
 (0)