Skip to content

Commit f45961b

Browse files
committed
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`
2 parents 0441150 + b996e5e commit f45961b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: src/bootstrap/bolt.rs

+2
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ pub fn optimize_with_bolt(path: &Path, profile_path: &Path, output_path: &Path)
4949
.arg("-icf=1")
5050
// Update DWARF debug info in the final binary
5151
.arg("-update-debug-sections")
52+
// Try to reuse old text segments to reduce binary size
53+
.arg("--use-old-text")
5254
// Print optimization statistics
5355
.arg("-dyno-stats")
5456
.status()

0 commit comments

Comments
 (0)