Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/tools/opt-dist/src/bolt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ pub fn with_bolt_instrumented<F: FnOnce(&Utf8Path) -> anyhow::Result<R>, R>(
}

/// Optimizes the file at `path` with BOLT in-place using the given `profile`.
#[allow(unused)]
pub fn bolt_optimize(
path: &Utf8Path,
profile: &BoltProfile,
Expand Down
10 changes: 5 additions & 5 deletions src/tools/opt-dist/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use clap::Parser;
use log::LevelFilter;
use utils::io;

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

Some(llvm_profile)
} else {
Expand All @@ -362,8 +362,8 @@ fn execute_pipeline(
print_free_disk_space()?;

// Now optimize the library with BOLT.
bolt_optimize(&rustc_lib, &rustc_profile, env)
.context("Could not optimize rustc with BOLT")?;
// bolt_optimize(&rustc_lib, &rustc_profile, env)
// .context("Could not optimize rustc with BOLT")?;

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