about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJonas Schievink <jonasschievink@gmail.com>2020-02-17 21:44:32 +0100
committerJonas Schievink <jonasschievink@gmail.com>2020-02-17 21:46:26 +0100
commitc9b87ac4b306cf43ca6e46defb91267fe257e45b (patch)
tree7ec203111060ce456e22f7492d057952d9e9f22a
parent0176a9eef845e7421b7e2f7ef015333a41a7c027 (diff)
downloadrust-c9b87ac4b306cf43ca6e46defb91267fe257e45b.tar.gz
rust-c9b87ac4b306cf43ca6e46defb91267fe257e45b.zip
Don't eliminate frame pointers on thumb targets
-rw-r--r--src/librustc_target/spec/thumb_base.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/librustc_target/spec/thumb_base.rs b/src/librustc_target/spec/thumb_base.rs
index 204f4723b70..6ab6fcb58bd 100644
--- a/src/librustc_target/spec/thumb_base.rs
+++ b/src/librustc_target/spec/thumb_base.rs
@@ -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 `nounwind` functions, which
+        // breaks debugging. Preserve LR by default to prevent that from happening.
+        eliminate_frame_pointer: false,
         ..Default::default()
     }
 }