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.
This commit is contained in:
Alex Crichton 2016-12-13 09:21:42 -08:00
parent bbf2b70893
commit 194c3fb154

View File

@ -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);