Skip to content

Commit

Permalink
Only test docs and such for the host
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed Nov 6, 2016
1 parent 18ee04b commit bdacb63
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/bootstrap/clean.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ pub fn clean(build: &Build) {
if entry.file_name().to_str() == Some("llvm") {
continue
}
rm_rf(build, &entry.path());
let path = t!(entry.path().canonicalize());
rm_rf(build, &path);
}
}
}
Expand Down
16 changes: 12 additions & 4 deletions src/bootstrap/step.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ pub fn build_rules(build: &Build) -> Rules {
.dep(|s| s.name("build-crate-rustc-main"));
for (krate, path, _default) in krates("std_shim") {
rules.build(&krate.build_step, path)
.dep(|s| s.name("rustc").target(s.host))
.dep(move |s| s.name("rustc").host(&build.config.build).target(s.host))
.dep(move |s| {
if s.host == build.config.build {
dummy(s, build)
Expand Down Expand Up @@ -296,31 +296,36 @@ pub fn build_rules(build: &Build) -> Rules {
rules.test("check-rustc-all", "path/to/nowhere")
.dep(|s| s.name("librustc"))
.default(true)
.host(true)
.host(true)
.run(move |s| check::krate(build, &s.compiler(), s.target, Mode::Librustc,
None));

rules.test("check-linkchecker", "src/tools/linkchecker")
.dep(|s| s.name("tool-linkchecker"))
.dep(|s| s.name("default:doc"))
.default(true)
.host(true)
.run(move |s| check::linkcheck(build, s.stage, s.target));
rules.test("check-cargotest", "src/tools/cargotest")
.dep(|s| s.name("tool-cargotest"))
.dep(|s| s.name("librustc"))
.host(true)
.run(move |s| check::cargotest(build, s.stage, s.target));
rules.test("check-tidy", "src/tools/tidy")
.dep(|s| s.name("tool-tidy"))
.default(true)
.host(true)
.run(move |s| check::tidy(build, s.stage, s.target));
rules.test("check-error-index", "src/tools/error_index_generator")
.dep(|s| s.name("libstd"))
.dep(|s| s.name("tool-error-index").host(s.host))
.default(true)
.host(true)
.run(move |s| check::error_index(build, &s.compiler()));
rules.test("check-docs", "src/doc")
.dep(|s| s.name("libtest"))
.default(true)
.host(true)
.run(move |s| check::docs(build, &s.compiler()));

rules.build("test-helpers", "src/rt/rust_test_helpers.c")
Expand Down Expand Up @@ -363,12 +368,14 @@ pub fn build_rules(build: &Build) -> Rules {
.default(build.config.docs)
.run(move |s| doc::rustbook(build, s.stage, s.target, "nomicon"));
rules.doc("doc-standalone", "src/doc")
.dep(move |s| s.name("rustc").target(&build.config.build))
.dep(move |s| s.name("rustc").host(&build.config.build).target(&build.config.build))
.default(build.config.docs)
.run(move |s| doc::standalone(build, s.stage, s.target));
rules.doc("doc-error-index", "src/tools/error_index_generator")
.dep(move |s| s.name("tool-error-index").target(&build.config.build))
.dep(move |s| s.name("librustc"))
.default(build.config.docs)
.host(true)
.run(move |s| doc::error_index(build, s.stage, s.target));
for (krate, path, default) in krates("std_shim") {
rules.doc(&krate.doc_step, path)
Expand All @@ -393,7 +400,7 @@ pub fn build_rules(build: &Build) -> Rules {
// ========================================================================
// Distribution targets
rules.dist("dist-rustc", "src/librustc")
.dep(|s| s.name("rustc"))
.dep(move |s| s.name("rustc").host(&build.config.build))
.host(true)
.default(true)
.run(move |s| dist::rustc(build, s.stage, s.target));
Expand Down Expand Up @@ -658,6 +665,7 @@ invalid rule dependency graph detected, was a rule added and maybe typo'd?

// And finally, iterate over everything and execute it.
for step in order.iter() {
self.build.verbose(&format!("executing step {:?}", step));
(self.rules[step.name].run)(step);
}
}
Expand Down

0 comments on commit bdacb63

Please sign in to comment.