Skip to content

Commit c6ad1e2

Browse files
authored
Rollup merge of #69248 - jonas-schievink:thumb-fp, r=japaric
Don't eliminate frame pointers on thumb targets This should hopefully fix issues #69231 and rust-embedded/cortex-m-rt#139. ~~I couldn't test this locally as the rustc I produced does not create binaries (no idea why).~~ Resolved.
2 parents 1761b39 + 27cfb2b commit c6ad1e2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/librustc_target/spec/thumb_base.rs

+3
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 `noreturn` 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)