Skip to content

Commit 3cdcdaf

Browse files
committed
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.
2 parents 13abc0a + aeb3447 commit 3cdcdaf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/bootstrap/src/core/build_steps/compile.rs

+4
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,10 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
550550
cargo.rustflag("-Cforce-unwind-tables=yes");
551551
}
552552

553+
// Enable frame pointers by default for the library. Note that they are still controlled by a
554+
// separate setting for the compiler.
555+
cargo.rustflag("-Cforce-frame-pointers=yes");
556+
553557
let html_root =
554558
format!("-Zcrate-attr=doc(html_root_url=\"{}/\")", builder.doc_rust_lang_org_channel(),);
555559
cargo.rustflag(&html_root);

0 commit comments

Comments
 (0)