]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #32718 - timonvo:bootstrap-skip-docs, r=alexcrichton
authorbors <bors@rust-lang.org>
Thu, 14 Apr 2016 07:38:58 +0000 (00:38 -0700)
committerbors <bors@rust-lang.org>
Thu, 14 Apr 2016 07:38:58 +0000 (00:38 -0700)
rustbuild: Skip generating docs if the config disables them.

r? @alexcrichton

1  2 
src/bootstrap/build/step.rs

index 45e0cb1101075bc0e68e5d2682a06a3a76e5dac2,c534a2c46bd7522e0a2e05baf4a7f15aa4205bb3..2312f96348c9dfe1aa4fd7e8e1cf5a94ec2ae8ea
@@@ -51,7 -51,6 +51,7 @@@ macro_rules! targets 
              (tool_rustbook, ToolRustbook { stage: u32 }),
              (tool_error_index, ToolErrorIndex { stage: u32 }),
              (tool_cargotest, ToolCargoTest { stage: u32 }),
 +            (tool_tidy, ToolTidy { stage: u32 }),
  
              // Steps for long-running native builds. Ideally these wouldn't
              // actually exist and would be part of build scripts, but for now
@@@ -80,7 -79,6 +80,7 @@@
              (check, Check { stage: u32, compiler: Compiler<'a> }),
              (check_linkcheck, CheckLinkcheck { stage: u32 }),
              (check_cargotest, CheckCargoTest { stage: u32 }),
 +            (check_tidy, CheckTidy { stage: u32 }),
  
              // Distribution targets, creating tarballs
              (dist, Dist { stage: u32 }),
@@@ -150,7 -148,9 +150,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
@@@ -318,12 -318,8 +320,12 @@@ impl<'a> Step<'a> 
              Source::CheckCargoTest { stage } => {
                  vec![self.tool_cargotest(stage)]
              }
 +            Source::CheckTidy { stage } => {
 +                vec![self.tool_tidy(stage)]
 +            }
  
 -            Source::ToolLinkchecker { stage } => {
 +            Source::ToolLinkchecker { stage } |
 +            Source::ToolTidy { stage } => {
                  vec![self.libstd(self.compiler(stage))]
              }
              Source::ToolErrorIndex { stage } |
                      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));
                      }
                  }