Skip to content

Commit 27b4f22

Browse files
committed
Accept verbosity in rustdoc.
1 parent ee8b578 commit 27b4f22

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/bootstrap/bin/rustdoc.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ fn main() {
2727
let stage = env::var("RUSTC_STAGE").expect("RUSTC_STAGE was not set");
2828
let sysroot = env::var_os("RUSTC_SYSROOT").expect("RUSTC_SYSROOT was not set");
2929

30+
use std::str::FromStr;
31+
32+
let verbose = match env::var("RUSTC_VERBOSE") {
33+
Ok(s) => usize::from_str(&s).expect("RUSTC_VERBOSE should be an integer"),
34+
Err(_) => 0,
35+
};
36+
3037
let mut dylib_path = bootstrap::util::dylib_path();
3138
dylib_path.insert(0, PathBuf::from(libdir));
3239

@@ -63,6 +70,10 @@ fn main() {
6370
cmd.arg("--deny-render-differences");
6471
}
6572

73+
if verbose > 1 {
74+
eprintln!("rustdoc command: {:?}", cmd);
75+
}
76+
6677
std::process::exit(match cmd.status() {
6778
Ok(s) => s.code().unwrap_or(1),
6879
Err(e) => panic!("\n\nfailed to run {:?}: {}\n\n", cmd, e),

0 commit comments

Comments
 (0)