diff options
| author | bors <bors@rust-lang.org> | 2020-08-13 06:17:25 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-08-13 06:17:25 +0000 |
| commit | d69b0997d7dcc99a188d5cb19137dedc4fc05d25 (patch) | |
| tree | 5acdb2c21607c96661b0a34e5d7f8c173197101a /src/bootstrap | |
| parent | 814bc4fe9364865bfaa94d7825b8eabc11245c7c (diff) | |
| parent | ce717476ffc2d7ca1bc737942e778b8e0e813e05 (diff) | |
Auto merge of #75431 - ehuss:platform-support, r=Mark-Simulacrum
Move platform support to the rustc book. This moves the [Platform Support](https://forge.rust-lang.org/release/platform-support.html) page from the forge to the rustc book. There are several reasons for doing this: * The forge is not really oriented towards end-users (it mostly contains infrastructure, governance and policy, internal team pages, etc.). This platform support page is useful to user to know which targets are supported. * This page can now be updated in-sync with any PRs that add or remove a target, or change its status. * This is now automatically checked on CI to verify the list does not get out of sync. Currently it only checks the presence/absence of an entry, but more sophisticated checks could be added in the future. I'm not 100% certain this is the best location, but I think it fits. I'd like to see the rustc guide continue to grow, including things like linking information and more platform-specific details.
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/builder.rs | 1 | ||||
| -rw-r--r-- | src/bootstrap/test.rs | 44 |
2 files changed, 45 insertions, 0 deletions
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index e13a5f24653..4b0905bd6c1 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -404,6 +404,7 @@ impl<'a> Builder<'a> { test::CrateLibrustc, test::CrateRustdoc, test::Linkcheck, + test::TierCheck, test::Cargotest, test::Cargo, test::Rls, diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index bb5b9296c0a..11e2564305f 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -2043,3 +2043,47 @@ impl Step for Bootstrap { run.builder.ensure(Bootstrap); } } + +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub struct TierCheck { + pub compiler: Compiler, + target: TargetSelection, +} + +impl Step for TierCheck { + type Output = (); + const DEFAULT: bool = true; + const ONLY_HOSTS: bool = true; + + fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> { + run.path("src/tools/tier-check") + } + + fn make_run(run: RunConfig<'_>) { + let compiler = run.builder.compiler_for(run.builder.top_stage, run.host, run.host); + run.builder.ensure(TierCheck { compiler, target: run.host }); + } + + /// Tests the Platform Support page in the rustc book. + fn run(self, builder: &Builder<'_>) { + builder.ensure(compile::Std { compiler: self.compiler, target: self.target }); + let mut cargo = tool::prepare_tool_cargo( + builder, + self.compiler, + Mode::ToolRustc, + self.target, + "run", + "src/tools/tier-check", + SourceType::InTree, + &[], + ); + cargo.arg(builder.src.join("src/doc/rustc/src/platform-support.md")); + cargo.arg(&builder.rustc(self.compiler)); + if builder.is_verbose() { + cargo.arg("--verbose"); + } + + builder.info("platform support check"); + try_run(builder, &mut cargo.into()); + } +} |
