From 4b9666a948c7f1fbd406eb7817edb96479494dc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= Date: Fri, 2 Oct 2026 12:53:38 +0200 Subject: [PATCH] Rename `LLVM_PGO_CRATES` to `BACKEND_PGO_CRATES` --- src/bootstrap/src/core/build_steps/dist.rs | 6 ++++-- src/build_helper/src/lib.rs | 4 ++-- src/tools/opt-dist/src/training.rs | 3 ++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/bootstrap/src/core/build_steps/dist.rs b/src/bootstrap/src/core/build_steps/dist.rs index 7073b334c41..4f9c8ecd6c3 100644 --- a/src/bootstrap/src/core/build_steps/dist.rs +++ b/src/bootstrap/src/core/build_steps/dist.rs @@ -1400,8 +1400,10 @@ fn prepare_source_tarball<'a>( builder.require_and_update_all_submodules(); // Vendor packages that are required by opt-dist to collect PGO profiles. - let pkgs_for_pgo_training = - build_helper::LLVM_PGO_CRATES.iter().chain(build_helper::RUSTC_PGO_CRATES).map(|pkg| { + let pkgs_for_pgo_training = build_helper::BACKEND_PGO_CRATES + .iter() + .chain(build_helper::RUSTC_PGO_CRATES) + .map(|pkg| { let mut manifest_path = builder.src.join("./src/tools/rustc-perf/collector/compile-benchmarks"); manifest_path.push(pkg); diff --git a/src/build_helper/src/lib.rs b/src/build_helper/src/lib.rs index e23a158ac05..493ff92fbdb 100644 --- a/src/build_helper/src/lib.rs +++ b/src/build_helper/src/lib.rs @@ -11,8 +11,8 @@ pub mod stage0_parser; pub mod targets; pub mod util; -/// The default set of crates for opt-dist to collect LLVM profiles. -pub const LLVM_PGO_CRATES: &[&str] = &[ +/// The default set of crates for opt-dist to collect backend (LLVM, Cranelift) profiles. +pub const BACKEND_PGO_CRATES: &[&str] = &[ "syn-2.0.101", "cargo-0.87.1", "serde-1.0.219", diff --git a/src/tools/opt-dist/src/training.rs b/src/tools/opt-dist/src/training.rs index b8d54dc3eca..df5c1ff3c49 100644 --- a/src/tools/opt-dist/src/training.rs +++ b/src/tools/opt-dist/src/training.rs @@ -1,5 +1,5 @@ use anyhow::Context; -use build_helper::{LLVM_PGO_CRATES, RUSTC_PGO_CRATES}; +use build_helper::{BACKEND_PGO_CRATES, RUSTC_PGO_CRATES}; use camino::{Utf8Path, Utf8PathBuf}; use humansize::BINARY; @@ -109,6 +109,7 @@ fn log_profile_stats( pub fn llvm_benchmarks(env: &Environment) -> CmdBuilder { init_compiler_benchmarks(env, &["Debug", "Opt"], &["Full"], LLVM_PGO_CRATES) + init_compiler_benchmarks(env, &["Debug", "Opt"], &["Full"], BACKEND_PGO_CRATES) } // Here we're profiling the `rustc` frontend, so we also include `Check`.