diff options
| author | bors <bors@rust-lang.org> | 2022-12-02 13:19:27 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-12-02 13:19:27 +0000 |
| commit | 89dd322512280a8757864be4c5795b2878ccdcef (patch) | |
| tree | cbabe43662c0739bc1a297c3ae0f21a97dcba57e | |
| parent | 90118a197ba91c248376e1ff72bdf7dc370776f6 (diff) | |
| parent | 5fd4b84e20315dcdb0bf05bff8512cc9f78d7380 (diff) | |
| download | rust-89dd322512280a8757864be4c5795b2878ccdcef.tar.gz rust-89dd322512280a8757864be4c5795b2878ccdcef.zip | |
Auto merge of #2708 - RalfJung:verbose-setup, r=RalfJung
forward verbosity to cargo setup
| -rw-r--r-- | src/tools/miri/cargo-miri/src/phases.rs | 2 | ||||
| -rw-r--r-- | src/tools/miri/cargo-miri/src/setup.rs | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/tools/miri/cargo-miri/src/phases.rs b/src/tools/miri/cargo-miri/src/phases.rs index 64b3187305e..91945ad39f5 100644 --- a/src/tools/miri/cargo-miri/src/phases.rs +++ b/src/tools/miri/cargo-miri/src/phases.rs @@ -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 diff --git a/src/tools/miri/cargo-miri/src/setup.rs b/src/tools/miri/cargo-miri/src/setup.rs index 3ec63ba0f10..a696546954f 100644 --- a/src/tools/miri/cargo-miri/src/setup.rs +++ b/src/tools/miri/cargo-miri/src/setup.rs @@ -13,7 +13,7 @@ use crate::util::*; /// 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()); |
