mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 10:45:18 +00:00
Auto merge of #2708 - RalfJung:verbose-setup, r=RalfJung
forward verbosity to cargo setup
This commit is contained in:
commit
89dd322512
@ -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
|
||||
|
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user