about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2016-12-13 09:21:42 -0800
committerAlex Crichton <alex@alexcrichton.com>2016-12-13 09:21:42 -0800
commit194c3fb1544e8bf6300989dd20f7254bad237c76 (patch)
treea639c99326fcebce53341538ddc5ecdaa778e64f
parentbbf2b708932288bb720acf66fdae2711b5940937 (diff)
downloadrust-194c3fb1544e8bf6300989dd20f7254bad237c76.tar.gz
rust-194c3fb1544e8bf6300989dd20f7254bad237c76.zip
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.
-rw-r--r--src/bootstrap/dist.rs5
1 files changed, 5 insertions, 0 deletions
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);