about summary refs log tree commit diff
path: root/src/bootstrap/doc.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2016-12-28 15:01:21 -0800
committerAlex Crichton <alex@alexcrichton.com>2016-12-30 09:06:57 -0800
commit254876ee73addc736eac3c6dca287a8be83eb3ef (patch)
treed34458f6ff08ef155e2585b36c8958422ea3dd28 /src/bootstrap/doc.rs
parent7f2d2afa9196ba6314a29e58d5324dbd9923c75e (diff)
downloadrust-254876ee73addc736eac3c6dca287a8be83eb3ef.tar.gz
rust-254876ee73addc736eac3c6dca287a8be83eb3ef.zip
rustbuild: Compile all support tools in stage0
This commit changes all tools and such to get compiled in stage0, not in
later stages. The purpose of this commit is to cut down dependencies on later
stages for future modifications to the build system. Notably we're going to be
adding builders that produce a full suite of cross-compiled artifacts for a
particular host, and that shouldn't compile the `x86_64-unknown-linux-gnu`
compiler more than once. Currently dependencies on, for example, the error index
end up compiling the `x86_64-unknown-linux-gnu` compiler more than necessary.

As a result here we move many dependencies on these tools to being produced by a
stage0 compiler, not a stage1+ compiler. None of these tools actually need to be
staged at all, so they'll exhibit consistent behavior across the stages.
Diffstat (limited to 'src/bootstrap/doc.rs')
-rw-r--r--src/bootstrap/doc.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs
index 4c4462bf122..b4f14863fd4 100644
--- a/src/bootstrap/doc.rs
+++ b/src/bootstrap/doc.rs
@@ -29,19 +29,19 @@ use util::{up_to_date, cp_r};
 ///
 /// This will not actually generate any documentation if the documentation has
 /// already been generated.
-pub fn rustbook(build: &Build, stage: u32, target: &str, name: &str) {
+pub fn rustbook(build: &Build, target: &str, name: &str) {
     let out = build.doc_out(target);
     t!(fs::create_dir_all(&out));
 
     let out = out.join(name);
-    let compiler = Compiler::new(stage, &build.config.build);
+    let compiler = Compiler::new(0, &build.config.build);
     let src = build.src.join("src/doc").join(name);
     let index = out.join("index.html");
     let rustbook = build.tool(&compiler, "rustbook");
     if up_to_date(&src, &index) && up_to_date(&rustbook, &index) {
         return
     }
-    println!("Rustbook stage{} ({}) - {}", stage, target, name);
+    println!("Rustbook ({}) - {}", target, name);
     let _ = fs::remove_dir_all(&out);
     build.run(build.tool_cmd(&compiler, "rustbook")
                    .arg("build")
@@ -213,11 +213,11 @@ pub fn rustc(build: &Build, stage: u32, target: &str) {
 
 /// Generates the HTML rendered error-index by running the
 /// `error_index_generator` tool.
-pub fn error_index(build: &Build, stage: u32, target: &str) {
-    println!("Documenting stage{} error index ({})", stage, target);
+pub fn error_index(build: &Build, target: &str) {
+    println!("Documenting error index ({})", target);
     let out = build.doc_out(target);
     t!(fs::create_dir_all(&out));
-    let compiler = Compiler::new(stage, &build.config.build);
+    let compiler = Compiler::new(0, &build.config.build);
     let mut index = build.tool_cmd(&compiler, "error_index_generator");
     index.arg("html");
     index.arg(out.join("error-index.html"));