From 776146e9ebb6bbe17a37bfad955f3dac95317275 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 16 Nov 2023 10:42:23 -0800 Subject: [PATCH] bootstrap: only show PGO warnings when verbose Building rustc with `--rust-profile-use` is currently dumping a lot of warnings of "no profile data available for function" from `rustc_smir` and `stable_mir`. These simply aren't exercised by the current profile- gathering steps, but that's to be expected for new or experimental functionality. I think for most people, these warnings will be just noise, so it makes sense to only have them in verbose builds. --- src/bootstrap/src/core/build_steps/compile.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs index af69860df1c..51e4195827f 100644 --- a/src/bootstrap/src/core/build_steps/compile.rs +++ b/src/bootstrap/src/core/build_steps/compile.rs @@ -887,7 +887,9 @@ fn run(self, builder: &Builder<'_>) { } else if let Some(path) = &builder.config.rust_profile_use { if compiler.stage == 1 { cargo.rustflag(&format!("-Cprofile-use={path}")); - cargo.rustflag("-Cllvm-args=-pgo-warn-missing-function"); + if builder.is_verbose() { + cargo.rustflag("-Cllvm-args=-pgo-warn-missing-function"); + } true } else { false