Skip to content

Commit

Permalink
Rollup merge of rust-lang#69248 - jonas-schievink:thumb-fp, r=japaric
Browse files Browse the repository at this point in the history
Don't eliminate frame pointers on thumb targets

This should hopefully fix issues rust-lang#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.
  • Loading branch information
Dylan-DPC authored Feb 19, 2020
2 parents 1761b39 + 27cfb2b commit c6ad1e2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/librustc_target/spec/thumb_base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}

0 comments on commit c6ad1e2

Please sign in to comment.