Rollup merge of #69248 - jonas-schievink:thumb-fp, r=japaric

Don't eliminate frame pointers on thumb targets

This should hopefully fix issues https://github.com/rust-lang/rust/issues/69231 and https://github.com/rust-embedded/cortex-m-rt/issues/139.

~~I couldn't test this locally as the rustc I produced does not create binaries (no idea why).~~ Resolved.
This commit is contained in:
Dylan DPC 2020-02-19 18:12:10 +01:00 committed by GitHub
commit c6ad1e2c2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -50,6 +50,9 @@ pub fn opts() -> TargetOptions {
// until we figure a way to add the pretty printers without requiring a volatile load cf.
// rust-lang/rust#44993.
emit_debug_gdb_scripts: false,
// LLVM is eager to trash the link register when calling `noreturn` functions, which
// breaks debugging. Preserve LR by default to prevent that from happening.
eliminate_frame_pointer: false,
..Default::default()
}
}