Skip to content

Commit 302602b

Browse files
committedJan 8, 2017
Auto merge of #38853 - alexcrichton:better-dist, r=brson
rustbuild: Don't build target compilers in stage0 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.
2 parents d2c7959 + be5e322 commit 302602b

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed
 

‎src/bootstrap/step.rs

+12-2
Original file line numberDiff line numberDiff line change
@@ -517,11 +517,21 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules {
517517
// ========================================================================
518518
// Documentation targets
519519
rules.doc("doc-book", "src/doc/book")
520-
.dep(move |s| s.name("tool-rustbook").target(&build.config.build).stage(0))
520+
.dep(move |s| {
521+
s.name("tool-rustbook")
522+
.host(&build.config.build)
523+
.target(&build.config.build)
524+
.stage(0)
525+
})
521526
.default(build.config.docs)
522527
.run(move |s| doc::rustbook(build, s.target, "book"));
523528
rules.doc("doc-nomicon", "src/doc/nomicon")
524-
.dep(move |s| s.name("tool-rustbook").target(&build.config.build).stage(0))
529+
.dep(move |s| {
530+
s.name("tool-rustbook")
531+
.host(&build.config.build)
532+
.target(&build.config.build)
533+
.stage(0)
534+
})
525535
.default(build.config.docs)
526536
.run(move |s| doc::rustbook(build, s.target, "nomicon"));
527537
rules.doc("doc-standalone", "src/doc")

0 commit comments

Comments
 (0)
Please sign in to comment.