diff options
| author | Jakub Beránek <berykubik@gmail.com> | 2025-08-12 11:17:20 +0200 |
|---|---|---|
| committer | Jakub Beránek <berykubik@gmail.com> | 2025-08-23 11:00:30 +0200 |
| commit | a1f67b6b2f5533461c6c7b06353cd584ec1ad5e2 (patch) | |
| tree | b846dcb5d462fb8549e5f48512d574b72a0d5079 /src/bootstrap | |
| parent | 391bb133f5cdd85901aa374521a4333be38f6dd3 (diff) | |
| download | rust-a1f67b6b2f5533461c6c7b06353cd584ec1ad5e2.tar.gz rust-a1f67b6b2f5533461c6c7b06353cd584ec1ad5e2.zip | |
Document the `rustc-docs` step
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/src/core/build_steps/dist.rs | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/src/bootstrap/src/core/build_steps/dist.rs b/src/bootstrap/src/core/build_steps/dist.rs index 5066640f8dc..3ac7a5d476b 100644 --- a/src/bootstrap/src/core/build_steps/dist.rs +++ b/src/bootstrap/src/core/build_steps/dist.rs @@ -75,6 +75,9 @@ impl Step for Docs { /// Builds the `rust-docs` installer component. fn run(self, builder: &Builder<'_>) -> Option<GeneratedTarball> { let host = self.host; + // FIXME: explicitly enumerate the steps that should be executed here, and gather their + // documentation, rather than running all default steps and then read their output + // from a shared directory. builder.run_default_doc_steps(); let dest = "share/doc/rust/html"; @@ -132,13 +135,20 @@ impl Step for JsonDocs { } } +/// Builds the `rustc-docs` installer component. +/// Apart from the documentation of the `rustc_*` crates, it also includes the documentation of +/// various in-tree helper tools (bootstrap, build_helper, tidy), +/// and also rustc_private tools like rustdoc, clippy, miri or rustfmt. +/// +/// It is currently hosted at https://doc.rust-lang.org/nightly/nightly-rustc #[derive(Debug, Clone, Hash, PartialEq, Eq)] pub struct RustcDocs { - pub host: TargetSelection, + target: TargetSelection, } impl Step for RustcDocs { - type Output = Option<GeneratedTarball>; + type Output = GeneratedTarball; + const DEFAULT: bool = true; const IS_HOST: bool = true; @@ -148,18 +158,17 @@ impl Step for RustcDocs { } fn make_run(run: RunConfig<'_>) { - run.builder.ensure(RustcDocs { host: run.target }); + run.builder.ensure(RustcDocs { target: run.target }); } - /// Builds the `rustc-docs` installer component. - fn run(self, builder: &Builder<'_>) -> Option<GeneratedTarball> { - let host = self.host; + fn run(self, builder: &Builder<'_>) -> Self::Output { + let target = self.target; builder.run_default_doc_steps(); - let mut tarball = Tarball::new(builder, "rustc-docs", &host.triple); + let mut tarball = Tarball::new(builder, "rustc-docs", &target.triple); tarball.set_product_name("Rustc Documentation"); - tarball.add_bulk_dir(builder.compiler_doc_out(host), "share/doc/rust/html/rustc"); - Some(tarball.generate()) + tarball.add_bulk_dir(builder.compiler_doc_out(target), "share/doc/rust/html/rustc"); + tarball.generate() } } |
