Skip to content

Commit 150ebd2

Browse files
committed
Disable BOLT optimization
1 parent c5dc558 commit 150ebd2

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ pub fn with_bolt_instrumented<F: FnOnce(&Utf8Path) -> anyhow::Result<R>, R>(
4747
}
4848

4949
/// Optimizes the file at `path` with BOLT in-place using the given `profile`.
50+
#[allow(unused)]
5051
pub fn bolt_optimize(
5152
path: &Utf8Path,
5253
profile: &BoltProfile,

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use clap::Parser;
44
use log::LevelFilter;
55
use utils::io;
66

7-
use crate::bolt::{bolt_optimize, with_bolt_instrumented};
7+
use crate::bolt::with_bolt_instrumented;
88
use crate::environment::{Environment, EnvironmentBuilder};
99
use crate::exec::{Bootstrap, cmd};
1010
use crate::tests::run_tests;
@@ -341,8 +341,8 @@ fn execute_pipeline(
341341
// the final dist build. However, when BOLT optimizes an artifact, it does so *in-place*,
342342
// therefore it will actually optimize all the hard links, which means that the final
343343
// packaged `libLLVM.so` file *will* be BOLT optimized.
344-
bolt_optimize(&llvm_lib, &llvm_profile, env)
345-
.context("Could not optimize LLVM with BOLT")?;
344+
// bolt_optimize(&llvm_lib, &llvm_profile, env)
345+
// .context("Could not optimize LLVM with BOLT")?;
346346

347347
Some(llvm_profile)
348348
} else {
@@ -362,8 +362,8 @@ fn execute_pipeline(
362362
print_free_disk_space()?;
363363

364364
// Now optimize the library with BOLT.
365-
bolt_optimize(&rustc_lib, &rustc_profile, env)
366-
.context("Could not optimize rustc with BOLT")?;
365+
// bolt_optimize(&rustc_lib, &rustc_profile, env)
366+
// .context("Could not optimize rustc with BOLT")?;
367367

368368
// LLVM is not being cleared here. Either we built it and we want to use the BOLT-optimized LLVM, or we
369369
// didn't build it, so we don't want to remove it.

0 commit comments

Comments
 (0)