about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-06-24 06:06:16 +0000
committerbors <bors@rust-lang.org>2024-06-24 06:06:16 +0000
commitb8e1d7ef6fcec31db99ef82d8a913a2a703e8944 (patch)
tree475052c1564920a30d5c4612177eafb17e7b72de /compiler/rustc_codegen_llvm
parentaded2be375993cfb08c8d13be71c046bd048c5d2 (diff)
parentc660016cc1879d9714d134604856b5914f5d0aa0 (diff)
downloadrust-b8e1d7ef6fcec31db99ef82d8a913a2a703e8944.tar.gz
rust-b8e1d7ef6fcec31db99ef82d8a913a2a703e8944.zip
Auto merge of #3706 - rust-lang:rustup-2024-06-24, r=oli-obk
Automatic Rustup
Diffstat (limited to 'compiler/rustc_codegen_llvm')
-rw-r--r--compiler/rustc_codegen_llvm/src/attributes.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/attributes.rs b/compiler/rustc_codegen_llvm/src/attributes.rs
index 870e5ab3296..48693895da1 100644
--- a/compiler/rustc_codegen_llvm/src/attributes.rs
+++ b/compiler/rustc_codegen_llvm/src/attributes.rs
@@ -108,9 +108,10 @@ pub fn frame_pointer_type_attr<'ll>(cx: &CodegenCx<'ll, '_>) -> Option<&'ll Attr
     let opts = &cx.sess().opts;
     // "mcount" function relies on stack pointer.
     // See <https://sourceware.org/binutils/docs/gprof/Implementation.html>.
-    if opts.unstable_opts.instrument_mcount || matches!(opts.cg.force_frame_pointers, Some(true)) {
-        fp = FramePointer::Always;
+    if opts.unstable_opts.instrument_mcount {
+        fp.ratchet(FramePointer::Always);
     }
+    fp.ratchet(opts.cg.force_frame_pointers);
     let attr_value = match fp {
         FramePointer::Always => "all",
         FramePointer::NonLeaf => "non-leaf",