]> git.lizzy.rs Git - rust.git/commitdiff
rustbuild: Don't build target compilers in stage0
authorAlex Crichton <alex@alexcrichton.com>
Thu, 5 Jan 2017 19:16:48 +0000 (11:16 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Thu, 5 Jan 2017 19:17:57 +0000 (11:17 -0800)
The `doc-book` and `doc-nomicon` steps accidentally depended on a rustbook
compiled by a cross-compiled compiler, which isn't necessary. Be sure to set the
`host` on these dependency edges to the build compiler to ensure that we're
always using a tool compiled for the host platform.

This was discovered trawling the build logs for the new dist bots and
discovering that they're building one too many compilers in stage0.

src/bootstrap/step.rs

index bf815a817ed87c4f2483ef2f74fde47f30561a10..c3e10405eb532600c5d547b7bf4983c9721ff874 100644 (file)
@@ -517,11 +517,21 @@ fn crate_rule<'a, 'b>(build: &'a Build,
     // ========================================================================
     // Documentation targets
     rules.doc("doc-book", "src/doc/book")
-         .dep(move |s| s.name("tool-rustbook").target(&build.config.build).stage(0))
+         .dep(move |s| {
+             s.name("tool-rustbook")
+              .host(&build.config.build)
+              .target(&build.config.build)
+              .stage(0)
+         })
          .default(build.config.docs)
          .run(move |s| doc::rustbook(build, s.target, "book"));
     rules.doc("doc-nomicon", "src/doc/nomicon")
-         .dep(move |s| s.name("tool-rustbook").target(&build.config.build).stage(0))
+         .dep(move |s| {
+             s.name("tool-rustbook")
+              .host(&build.config.build)
+              .target(&build.config.build)
+              .stage(0)
+         })
          .default(build.config.docs)
          .run(move |s| doc::rustbook(build, s.target, "nomicon"));
     rules.doc("doc-standalone", "src/doc")