about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJakub Beránek <berykubik@gmail.com>2023-07-27 21:31:06 +0200
committerJakub Beránek <berykubik@gmail.com>2023-07-28 13:49:48 +0200
commitb996e5e95b45c040d22c20b7b5f6968c29bfbea6 (patch)
treec352337678c645f5805570705f366a0c50659832
parent9339f446a5302cd5041d3f3b5e59761f36699167 (diff)
downloadrust-b996e5e95b45c040d22c20b7b5f6968c29bfbea6.tar.gz
rust-b996e5e95b45c040d22c20b7b5f6968c29bfbea6.zip
Change LLVM BOLT flags
-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()