Skip to content

Commit 194c3fb

Browse files
committed
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.
1 parent bbf2b70 commit 194c3fb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/bootstrap/dist.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ pub fn tmpdir(build: &Build) -> PathBuf {
4848
/// Slurps up documentation from the `stage`'s `host`.
4949
pub fn docs(build: &Build, stage: u32, host: &str) {
5050
println!("Dist docs stage{} ({})", stage, host);
51+
if !build.config.docs {
52+
println!("\tskipping - docs disabled");
53+
return
54+
}
55+
5156
let name = format!("rust-docs-{}", package_vers(build));
5257
let image = tmpdir(build).join(format!("{}-{}-image", name, name));
5358
let _ = fs::remove_dir_all(&image);

0 commit comments

Comments
 (0)