about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-03-18 12:43:41 +0000
committerbors <bors@rust-lang.org>2024-03-18 12:43:41 +0000
commit3cdcdaf31b45f8045164aae9604573d23091970b (patch)
treea4e4be62ab28c8d4c24d4061f8dcb28bf5f1e5c6
parent13abc0ac9b2b77299cf02d634fc409e26a180ef3 (diff)
parentaeb3447f618f3a95ade0f84fbca9b4b15cdf1580 (diff)
Auto merge of #122646 - saethlin:library-frame-pointers, r=onur-ozkan
Enable frame pointers for the standard library

There's been a few past experiments for enabling frame pointers for all our artifacts. I don't think that frame pointers in the distributed compiler are nearly as useful as frame pointers in the standard library. Our users are much more likely to be profiling apps written in Rust than they are profiling the Rust compiler.

So yeah it would be cool to have frame pointers in the compiler, but much more of the value is having them on the precompiled standard library. That's what this PR does.
-rw-r--r--src/bootstrap/src/core/build_steps/compile.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs
index e927b491c71..2076444ca0c 100644
--- a/src/bootstrap/src/core/build_steps/compile.rs
+++ b/src/bootstrap/src/core/build_steps/compile.rs
@@ -550,6 +550,10 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
         cargo.rustflag("-Cforce-unwind-tables=yes");
     }
 
+    // Enable frame pointers by default for the library. Note that they are still controlled by a
+    // separate setting for the compiler.
+    cargo.rustflag("-Cforce-frame-pointers=yes");
+
     let html_root =
         format!("-Zcrate-attr=doc(html_root_url=\"{}/\")", builder.doc_rust_lang_org_channel(),);
     cargo.rustflag(&html_root);