about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2023-11-16 10:42:23 -0800
committerJosh Stone <jistone@redhat.com>2023-11-16 10:42:23 -0800
commit776146e9ebb6bbe17a37bfad955f3dac95317275 (patch)
tree5878045ede7319510d8f3aa174750d5ece2329fa /src/bootstrap
parent0ea7ddcc35a2fcaa5da8a7dcfc118c9fb4a63b95 (diff)
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.
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/src/core/build_steps/compile.rs4
1 files changed, 3 insertions, 1 deletions
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 @@ impl Step for Rustc {
         } 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