From 4c87e84f998378f125222f876ef454a71861a7f4 Mon Sep 17 00:00:00 2001 From: onur-ozkan Date: Thu, 25 Jul 2024 16:04:36 +0300 Subject: allow running `x doc` on std for no_std targets Since we now handle library crates properly, there's no need to panic for `no_std` targets anymore. `x doc library` now generates documentation for the `alloc` crate from standard library. Signed-off-by: onur-ozkan --- src/bootstrap/src/core/build_steps/doc.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/bootstrap') diff --git a/src/bootstrap/src/core/build_steps/doc.rs b/src/bootstrap/src/core/build_steps/doc.rs index 0b780dae9c2..53925a3f54b 100644 --- a/src/bootstrap/src/core/build_steps/doc.rs +++ b/src/bootstrap/src/core/build_steps/doc.rs @@ -589,6 +589,7 @@ impl Step for Std { } fn make_run(run: RunConfig<'_>) { + let crates = compile::std_crates_for_run_make(&run); run.builder.ensure(Std { stage: run.builder.top_stage, target: run.target, @@ -597,7 +598,7 @@ impl Step for Std { } else { DocumentationFormat::Html }, - crates: run.make_run_crates(Alias::Library), + crates, }); } @@ -695,13 +696,6 @@ fn doc_std( extra_args: &[&str], requested_crates: &[String], ) { - if builder.no_std(target) == Some(true) { - panic!( - "building std documentation for no_std target {target} is not supported\n\ - Set `docs = false` in the config to disable documentation, or pass `--skip library`." - ); - } - let compiler = builder.compiler(stage, builder.config.build); let target_doc_dir_name = if format == DocumentationFormat::Json { "json-doc" } else { "doc" }; -- cgit 1.4.1-3-g733a5