From 194c3fb1544e8bf6300989dd20f7254bad237c76 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 13 Dec 2016 09:21:42 -0800 Subject: [PATCH] rustbuild: Don't dist docs if disabled This commit skips the `docs` dist step if the `--disable-docs` flag is passed, fixing a compile error seen on nightly. --- src/bootstrap/dist.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs index 245859b78d0..60352cc894e 100644 --- a/src/bootstrap/dist.rs +++ b/src/bootstrap/dist.rs @@ -48,6 +48,11 @@ pub fn tmpdir(build: &Build) -> PathBuf { /// Slurps up documentation from the `stage`'s `host`. pub fn docs(build: &Build, stage: u32, host: &str) { println!("Dist docs stage{} ({})", stage, host); + if !build.config.docs { + println!("\tskipping - docs disabled"); + return + } + let name = format!("rust-docs-{}", package_vers(build)); let image = tmpdir(build).join(format!("{}-{}-image", name, name)); let _ = fs::remove_dir_all(&image);