about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-06-06 21:21:59 +0000
committerbors <bors@rust-lang.org>2025-06-06 21:21:59 +0000
commit868bf2da31d1c6ead7016d5ee52eacfd2e2fd158 (patch)
tree6073a848eda24c197c88b71e83ac86b38169233f
parent44f415c1d617ebc7b931a243b7b321ef8a6ca47c (diff)
parent2d5d55a50ab6c6e1f5af65e42b73cd173536b03d (diff)
downloadrust-868bf2da31d1c6ead7016d5ee52eacfd2e2fd158.tar.gz
rust-868bf2da31d1c6ead7016d5ee52eacfd2e2fd158.zip
Auto merge of #141800 - workingjubilee:build-std-with-less-leaf-pointers, r=saethlin
bootstrap: build std sans leaf frame pointers

Sometimes leaf frame-pointers can impact LLVM inlining choices, and that can be a real problem for things like `mul_add`.
-rw-r--r--src/bootstrap/src/core/build_steps/compile.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs
index d52b9dd1f3a..5ecce31fe15 100644
--- a/src/bootstrap/src/core/build_steps/compile.rs
+++ b/src/bootstrap/src/core/build_steps/compile.rs
@@ -668,7 +668,8 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
 
     // 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");
+    cargo.rustflag("-Zunstable-options");
+    cargo.rustflag("-Cforce-frame-pointers=non-leaf");
 
     let html_root =
         format!("-Zcrate-attr=doc(html_root_url=\"{}/\")", builder.doc_rust_lang_org_channel(),);