diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2021-03-31 01:14:50 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-31 01:14:50 +0200 |
| commit | 7a587f0d06d13e9e8186e5c481abddb1760e6020 (patch) | |
| tree | 51213a7b156833231b47a2881b95419d76435ef0 | |
| parent | 2aa1bf8984f9822a1583317d4471f642fa815afd (diff) | |
| parent | 8f97b948e36e16a309df436259ac38bb92975eea (diff) | |
| download | rust-7a587f0d06d13e9e8186e5c481abddb1760e6020.tar.gz rust-7a587f0d06d13e9e8186e5c481abddb1760e6020.zip | |
Rollup merge of #83683 - tblah:riscv64linux_links, r=Mark-Simulacrum
bootstrap: don't complain about linkcheck if it is excluded We don't need to complain to the user about linkcheck having different hosts and targets when it is already excluded. Resolves #83661
| -rw-r--r-- | src/bootstrap/test.rs | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index f4976f2f436..adb0a372c64 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -108,6 +108,19 @@ impl Step for Linkcheck { /// documentation to ensure we don't have a bunch of dead ones. fn run(self, builder: &Builder<'_>) { let host = self.host; + let hosts = &builder.hosts; + let targets = &builder.targets; + + // if we have different hosts and targets, some things may be built for + // the host (e.g. rustc) and others for the target (e.g. std). The + // documentation built for each will contain broken links to + // docs built for the other platform (e.g. rustc linking to cargo) + if (hosts != targets) && !hosts.is_empty() && !targets.is_empty() { + panic!( + "Linkcheck currently does not support builds with different hosts and targets. +You can skip linkcheck with --exclude src/tools/linkchecker" + ); + } builder.info(&format!("Linkcheck ({})", host)); @@ -123,19 +136,6 @@ impl Step for Linkcheck { fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> { let builder = run.builder; let run = run.path("src/tools/linkchecker"); - let hosts = &builder.hosts; - let targets = &builder.targets; - - // if we have different hosts and targets, some things may be built for - // the host (e.g. rustc) and others for the target (e.g. std). The - // documentation built for each will contain broken links to - // docs built for the other platform (e.g. rustc linking to cargo) - if (hosts != targets) && !hosts.is_empty() && !targets.is_empty() { - panic!( - "Linkcheck currently does not support builds with different hosts and targets. -You can skip linkcheck with --exclude src/tools/linkchecker" - ); - } run.default_condition(builder.config.docs) } |
