Skip to content

Commit b46a95f

Browse files
committed
Auto merge of #2708 - RalfJung:verbose-setup, r=RalfJung
forward verbosity to cargo setup
2 parents cfa28cf + 3378d9d commit b46a95f

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

cargo-miri/src/phases.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ pub fn phase_cargo_miri(mut args: impl Iterator<Item = String>) {
9494
let target = target.as_ref().unwrap_or(host);
9595

9696
// We always setup.
97-
setup(&subcommand, target, &rustc_version);
97+
setup(&subcommand, target, &rustc_version, verbose);
9898

9999
// Invoke actual cargo for the job, but with different flags.
100100
// We re-use `cargo test` and `cargo run`, which makes target and binary handling very easy but

cargo-miri/src/setup.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use crate::util::*;
1313
/// Performs the setup required to make `cargo miri` work: Getting a custom-built libstd. Then sets
1414
/// `MIRI_SYSROOT`. Skipped if `MIRI_SYSROOT` is already set, in which case we expect the user has
1515
/// done all this already.
16-
pub fn setup(subcommand: &MiriCommand, target: &str, rustc_version: &VersionMeta) {
16+
pub fn setup(subcommand: &MiriCommand, target: &str, rustc_version: &VersionMeta, verbose: usize) {
1717
let only_setup = matches!(subcommand, MiriCommand::Setup);
1818
let ask_user = !only_setup;
1919
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
100100
command.env("RUSTC_WRAPPER", "");
101101

102102
if only_setup && !print_sysroot {
103-
// Forward output.
103+
// Forward output. Even make it verbose, if requested.
104+
for _ in 0..verbose {
105+
command.arg("-v");
106+
}
104107
} else {
105108
// Supress output.
106109
command.stdout(process::Stdio::null());

0 commit comments

Comments
 (0)