]> git.lizzy.rs Git - rust.git/commitdiff
forward verbosity to cargo setup
authorRalf Jung <post@ralfj.de>
Fri, 2 Dec 2022 12:56:42 +0000 (13:56 +0100)
committerRalf Jung <post@ralfj.de>
Fri, 2 Dec 2022 12:57:20 +0000 (13:57 +0100)
src/tools/miri/cargo-miri/src/phases.rs
src/tools/miri/cargo-miri/src/setup.rs

index 64b3187305e1af975c2c8a823d038f7cb20280d7..91945ad39f50b2381bf68bf7a4255e5c6b586919 100644 (file)
@@ -94,7 +94,7 @@ pub fn phase_cargo_miri(mut args: impl Iterator<Item = String>) {
     let target = target.as_ref().unwrap_or(host);
 
     // We always setup.
-    setup(&subcommand, target, &rustc_version);
+    setup(&subcommand, target, &rustc_version, verbose);
 
     // Invoke actual cargo for the job, but with different flags.
     // We re-use `cargo test` and `cargo run`, which makes target and binary handling very easy but
index 3ec63ba0f104fefb6663839813a27036af41f044..a696546954f90b9b3450aeb4610784cd1139742d 100644 (file)
@@ -13,7 +13,7 @@
 /// Performs the setup required to make `cargo miri` work: Getting a custom-built libstd. Then sets
 /// `MIRI_SYSROOT`. Skipped if `MIRI_SYSROOT` is already set, in which case we expect the user has
 /// done all this already.
-pub fn setup(subcommand: &MiriCommand, target: &str, rustc_version: &VersionMeta) {
+pub fn setup(subcommand: &MiriCommand, target: &str, rustc_version: &VersionMeta, verbose: usize) {
     let only_setup = matches!(subcommand, MiriCommand::Setup);
     let ask_user = !only_setup;
     let print_sysroot = only_setup && has_arg_flag("--print-sysroot"); // whether we just print the sysroot path
@@ -100,7 +100,10 @@ pub fn setup(subcommand: &MiriCommand, target: &str, rustc_version: &VersionMeta
         command.env("RUSTC_WRAPPER", "");
 
         if only_setup && !print_sysroot {
-            // Forward output.
+            // Forward output. Even make it verbose, if requested.
+            for _ in 0..verbose {
+                command.arg("-v");
+            }
         } else {
             // Supress output.
             command.stdout(process::Stdio::null());