Skip to content
/ rust Public
forked from rust-lang/rust

Commit d190d97

Browse files
committed
Auto merge of rust-lang#114649 - Kobzol:bolt-remove-use-old-text, r=nikic
Remove usage of `--use-old-text` for BOLT This flag has [reduced](rust-lang#114141) the size of `libLLVM.so` by ~50 MiB, but sadly it is quite non-deterministic and the size savings frequently fail, thus causing large artifact size [swings](rust-lang#114297 (comment)). To avoid the swings, it would be better to just disable the flag for now. r? `@nikic`
2 parents 19a647d + 6b4ec09 commit d190d97

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/tools/opt-dist/src/bolt.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,13 @@ pub fn bolt_optimize(path: &Utf8Path, profile: &LlvmBoltProfile) -> anyhow::Resu
6565
.arg("-jump-tables=move")
6666
// Fold functions with identical code
6767
.arg("-icf=1")
68+
// The following flag saves about 50 MiB of libLLVM.so size.
69+
// However, it succeeds very non-deterministically. To avoid frequent artifact size swings,
70+
// it is kept disabled for now.
71+
// FIXME(kobzol): try to re-enable this once BOLT in-place rewriting is merged or after
72+
// we bump LLVM.
6873
// Try to reuse old text segments to reduce binary size
69-
.arg("--use-old-text")
74+
// .arg("--use-old-text")
7075
// Update DWARF debug info in the final binary
7176
.arg("-update-debug-sections")
7277
// Print optimization statistics

0 commit comments

Comments
 (0)