Skip to content

Commit c9b87ac

Browse files
Don't eliminate frame pointers on thumb targets
1 parent 0176a9e commit c9b87ac

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/librustc_target/spec/thumb_base.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ pub fn opts() -> TargetOptions {
5050
// until we figure a way to add the pretty printers without requiring a volatile load cf.
5151
// rust-lang/rust#44993.
5252
emit_debug_gdb_scripts: false,
53+
// LLVM is eager to trash the link register when calling `nounwind` functions, which
54+
// breaks debugging. Preserve LR by default to prevent that from happening.
55+
eliminate_frame_pointer: false,
5356
..Default::default()
5457
}
5558
}

0 commit comments

Comments
 (0)