about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2023-11-18 15:55:58 +0100
committerRalf Jung <post@ralfj.de>2023-11-18 15:59:50 +0100
commiteba8d293022706412c290ebe2d4c4ad85b550689 (patch)
treed28066a4e95dc7ae2c91a740a9de6e4360b3ab19
parentee48a3f24121d42ba32b69856d6d6e22ae01d8c7 (diff)
downloadrust-eba8d293022706412c290ebe2d4c4ad85b550689.tar.gz
rust-eba8d293022706412c290ebe2d4c4ad85b550689.zip
cargo-miri: when verbose, print where the sysroot is being built
-rw-r--r--src/tools/miri/cargo-miri/src/setup.rs19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/tools/miri/cargo-miri/src/setup.rs b/src/tools/miri/cargo-miri/src/setup.rs
index d921741d5de..8ae5b8c3e82 100644
--- a/src/tools/miri/cargo-miri/src/setup.rs
+++ b/src/tools/miri/cargo-miri/src/setup.rs
@@ -2,6 +2,7 @@
 
 use std::env;
 use std::ffi::OsStr;
+use std::fmt::Write;
 use std::path::PathBuf;
 use std::process::{self, Command};
 
@@ -140,12 +141,20 @@ pub fn setup(
     // Do the build.
     if print_sysroot {
         // Be silent.
-    } else if only_setup {
-        // We want to be explicit.
-        eprintln!("Preparing a sysroot for Miri (target: {target})...");
     } else {
-        // We want to be quiet, but still let the user know that something is happening.
-        eprint!("Preparing a sysroot for Miri (target: {target})... ");
+        let mut msg = String::new();
+        write!(msg, "Preparing a sysroot for Miri (target: {target})").unwrap();
+        if verbose > 0 {
+            write!(msg, " in {}", sysroot_dir.display()).unwrap();
+        }
+        write!(msg, "...").unwrap();
+        if only_setup {
+            // We want to be explicit.
+            eprintln!("{msg}");
+        } else {
+            // We want to be quiet, but still let the user know that something is happening.
+            eprint!("{msg} ");
+        }
     }
     SysrootBuilder::new(&sysroot_dir, target)
         .build_mode(BuildMode::Check)