Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions src/bootstrap/src/core/build_steps/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2677,7 +2677,7 @@ pub fn run_cargo(
let (filenames_vec, crate_types) = match msg {
CargoMessage::CompilerArtifact {
filenames,
target: CargoTarget { crate_types, .. },
target: CargoTarget { crate_types },
..
} => {
let mut f: Vec<String> = filenames.into_iter().map(|s| s.into_owned()).collect();
Expand Down Expand Up @@ -2884,14 +2884,12 @@ pub fn stream_cargo(
status.success()
}

#[derive(Deserialize, Debug)]
#[derive(Deserialize)]
pub struct CargoTarget<'a> {
pub crate_types: Vec<Cow<'a, str>>,
#[serde(default)]
pub doc: bool,
crate_types: Vec<Cow<'a, str>>,
}

#[derive(Deserialize, Debug)]
#[derive(Deserialize)]
#[serde(tag = "reason", rename_all = "kebab-case")]
pub enum CargoMessage<'a> {
CompilerArtifact { filenames: Vec<Cow<'a, str>>, target: CargoTarget<'a> },
Expand Down
9 changes: 4 additions & 5 deletions src/bootstrap/src/core/build_steps/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use crate::core::backend::CodegenBackendKind;
use crate::core::build_steps::compile::{
get_codegen_backend_file, libgccjit_path_relative_to_cg_dir, normalize_codegen_backend_name,
};
use crate::core::build_steps::doc::{CompilerWithTools, DocumentationFormat};
use crate::core::build_steps::doc::DocumentationFormat;
use crate::core::build_steps::gcc::GccTargetPair;
use crate::core::build_steps::llvm::{
LLVM_CI_LINK_TYPE_PATH, LlvmBuildStatus, LlvmKind, get_llvm_build_status,
Expand Down Expand Up @@ -185,7 +185,7 @@ impl CommandLineStep for JsonDocs {
}
}

/// Builds the `rustc-docs` component.
/// 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.
Expand Down Expand Up @@ -214,12 +214,11 @@ impl CommandLineStep for RustcDocs {

fn run(self, builder: &Builder<'_>) -> Self::Output {
let target = self.target;
let combined_docs =
builder.ensure(CompilerWithTools::for_stage(builder, builder.top_stage, self.target));
builder.run_default_doc_steps();

let mut tarball = Tarball::new(builder, "rustc-docs", &target.triple);
tarball.set_product_name("Rustc Documentation");
tarball.add_bulk_dir(combined_docs, "share/doc/rust/html/rustc-docs");
tarball.add_bulk_dir(builder.compiler_doc_out(target), "share/doc/rust/html/rustc-docs");
tarball.generate()
}
}
Expand Down
Loading
Loading