diff options
| author | onur-ozkan <work@onurozkan.dev> | 2024-07-25 16:04:36 +0300 |
|---|---|---|
| committer | onur-ozkan <work@onurozkan.dev> | 2024-07-29 10:43:31 +0300 |
| commit | 4c87e84f998378f125222f876ef454a71861a7f4 (patch) | |
| tree | 81411ad5bf1caeca9dd858cc1b7ebd7506a7608a | |
| parent | 6e247195c644aa924a10c98cc8eb3a28e1a87929 (diff) | |
| download | rust-4c87e84f998378f125222f876ef454a71861a7f4.tar.gz rust-4c87e84f998378f125222f876ef454a71861a7f4.zip | |
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 <work@onurozkan.dev>
| -rw-r--r-- | src/bootstrap/src/core/build_steps/doc.rs | 10 |
1 files changed, 2 insertions, 8 deletions
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" }; |
