Skip to content

Commit bdacb63

Browse files
committed
Only test docs and such for the host
1 parent 18ee04b commit bdacb63

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

src/bootstrap/clean.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ pub fn clean(build: &Build) {
3636
if entry.file_name().to_str() == Some("llvm") {
3737
continue
3838
}
39-
rm_rf(build, &entry.path());
39+
let path = t!(entry.path().canonicalize());
40+
rm_rf(build, &path);
4041
}
4142
}
4243
}

src/bootstrap/step.rs

+12-4
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ pub fn build_rules(build: &Build) -> Rules {
112112
.dep(|s| s.name("build-crate-rustc-main"));
113113
for (krate, path, _default) in krates("std_shim") {
114114
rules.build(&krate.build_step, path)
115-
.dep(|s| s.name("rustc").target(s.host))
115+
.dep(move |s| s.name("rustc").host(&build.config.build).target(s.host))
116116
.dep(move |s| {
117117
if s.host == build.config.build {
118118
dummy(s, build)
@@ -296,31 +296,36 @@ pub fn build_rules(build: &Build) -> Rules {
296296
rules.test("check-rustc-all", "path/to/nowhere")
297297
.dep(|s| s.name("librustc"))
298298
.default(true)
299-
.host(true)
299+
.host(true)
300300
.run(move |s| check::krate(build, &s.compiler(), s.target, Mode::Librustc,
301301
None));
302302

303303
rules.test("check-linkchecker", "src/tools/linkchecker")
304304
.dep(|s| s.name("tool-linkchecker"))
305305
.dep(|s| s.name("default:doc"))
306306
.default(true)
307+
.host(true)
307308
.run(move |s| check::linkcheck(build, s.stage, s.target));
308309
rules.test("check-cargotest", "src/tools/cargotest")
309310
.dep(|s| s.name("tool-cargotest"))
310311
.dep(|s| s.name("librustc"))
312+
.host(true)
311313
.run(move |s| check::cargotest(build, s.stage, s.target));
312314
rules.test("check-tidy", "src/tools/tidy")
313315
.dep(|s| s.name("tool-tidy"))
314316
.default(true)
317+
.host(true)
315318
.run(move |s| check::tidy(build, s.stage, s.target));
316319
rules.test("check-error-index", "src/tools/error_index_generator")
317320
.dep(|s| s.name("libstd"))
318321
.dep(|s| s.name("tool-error-index").host(s.host))
319322
.default(true)
323+
.host(true)
320324
.run(move |s| check::error_index(build, &s.compiler()));
321325
rules.test("check-docs", "src/doc")
322326
.dep(|s| s.name("libtest"))
323327
.default(true)
328+
.host(true)
324329
.run(move |s| check::docs(build, &s.compiler()));
325330

326331
rules.build("test-helpers", "src/rt/rust_test_helpers.c")
@@ -363,12 +368,14 @@ pub fn build_rules(build: &Build) -> Rules {
363368
.default(build.config.docs)
364369
.run(move |s| doc::rustbook(build, s.stage, s.target, "nomicon"));
365370
rules.doc("doc-standalone", "src/doc")
366-
.dep(move |s| s.name("rustc").target(&build.config.build))
371+
.dep(move |s| s.name("rustc").host(&build.config.build).target(&build.config.build))
367372
.default(build.config.docs)
368373
.run(move |s| doc::standalone(build, s.stage, s.target));
369374
rules.doc("doc-error-index", "src/tools/error_index_generator")
370375
.dep(move |s| s.name("tool-error-index").target(&build.config.build))
376+
.dep(move |s| s.name("librustc"))
371377
.default(build.config.docs)
378+
.host(true)
372379
.run(move |s| doc::error_index(build, s.stage, s.target));
373380
for (krate, path, default) in krates("std_shim") {
374381
rules.doc(&krate.doc_step, path)
@@ -393,7 +400,7 @@ pub fn build_rules(build: &Build) -> Rules {
393400
// ========================================================================
394401
// Distribution targets
395402
rules.dist("dist-rustc", "src/librustc")
396-
.dep(|s| s.name("rustc"))
403+
.dep(move |s| s.name("rustc").host(&build.config.build))
397404
.host(true)
398405
.default(true)
399406
.run(move |s| dist::rustc(build, s.stage, s.target));
@@ -658,6 +665,7 @@ invalid rule dependency graph detected, was a rule added and maybe typo'd?
658665

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

0 commit comments

Comments
 (0)