about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-07-29 09:37:49 +0000
committerbors <bors@rust-lang.org>2023-07-29 09:37:49 +0000
commitf45961b60dba72a6d0be4c29872941982cc26c2e (patch)
treec565e05029929f5a36aa65da5bdc83b709b22223 /src/bootstrap
parent04411507bef1d2db441acdc1d89268f0cbaaccbc (diff)
parentb996e5e95b45c040d22c20b7b5f6968c29bfbea6 (diff)
downloadrust-f45961b60dba72a6d0be4c29872941982cc26c2e.tar.gz
rust-f45961b60dba72a6d0be4c29872941982cc26c2e.zip
Auto merge of #114141 - Kobzol:llvm-bolt-flags, r=lqd
Change LLVM BOLT flags

I talked to the BOLT maintainers about the binary size effect of BOLT. Currently, BOLTing LLVM increases its binary size from ~120 MiB to ~170 MiB, which is not ideal. Now we can track both runtime performance and (rustc, LLVM, ...) artifact sizes in perf.RLO, so I'd like to try experimenting with changing the flags to reduce `libLLVM.so` size without regressing the performance gains of BOLT too much.

r? `@ghost`
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/bolt.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/bootstrap/bolt.rs b/src/bootstrap/bolt.rs
index 5384181ea68..017c4602d43 100644
--- a/src/bootstrap/bolt.rs
+++ b/src/bootstrap/bolt.rs
@@ -49,6 +49,8 @@ pub fn optimize_with_bolt(path: &Path, profile_path: &Path, output_path: &Path)
         .arg("-icf=1")
         // Update DWARF debug info in the final binary
         .arg("-update-debug-sections")
+        // Try to reuse old text segments to reduce binary size
+        .arg("--use-old-text")
         // Print optimization statistics
         .arg("-dyno-stats")
         .status()