Skip to content

Commit 2805e83

Browse files
committed
rustbuild: Skip generating docs if the config disables them.
It looks like before these config variables weren't actually taken into account. This patch should make the build system skip over the documentation steps correctly.
1 parent 526f2bf commit 2805e83

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/bootstrap/build/step.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,9 @@ fn top_level(build: &Build) -> Vec<Step> {
148148
src: Source::Llvm { _dummy: () },
149149
target: &build.config.build,
150150
};
151-
targets.push(t.doc(stage));
151+
if build.config.docs {
152+
targets.push(t.doc(stage));
153+
}
152154
for host in build.config.host.iter() {
153155
if !build.flags.host.contains(host) {
154156
continue
@@ -350,7 +352,9 @@ impl<'a> Step<'a> {
350352
let compiler = self.compiler(stage);
351353
for target in build.config.target.iter() {
352354
let target = self.target(target);
353-
base.push(target.dist_docs(stage));
355+
if build.config.docs {
356+
base.push(target.dist_docs(stage));
357+
}
354358
base.push(target.dist_std(compiler));
355359
}
356360
}

0 commit comments

Comments
 (0)