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.
This commit is contained in:
Timon Van Overveldt 2016-04-03 21:09:19 -07:00
parent 526f2bf5c5
commit 2805e83dcb

View File

@ -148,7 +148,9 @@ fn top_level(build: &Build) -> Vec<Step> {
src: Source::Llvm { _dummy: () },
target: &build.config.build,
};
targets.push(t.doc(stage));
if build.config.docs {
targets.push(t.doc(stage));
}
for host in build.config.host.iter() {
if !build.flags.host.contains(host) {
continue
@ -350,7 +352,9 @@ impl<'a> Step<'a> {
let compiler = self.compiler(stage);
for target in build.config.target.iter() {
let target = self.target(target);
base.push(target.dist_docs(stage));
if build.config.docs {
base.push(target.dist_docs(stage));
}
base.push(target.dist_std(compiler));
}
}