Skip to content

Commit 4c87e84

Browse files
committed
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 <[email protected]>
1 parent 6e24719 commit 4c87e84

File tree

1 file changed

+2
-8
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+2
-8
lines changed

src/bootstrap/src/core/build_steps/doc.rs

+2-8
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,7 @@ impl Step for Std {
589589
}
590590

591591
fn make_run(run: RunConfig<'_>) {
592+
let crates = compile::std_crates_for_run_make(&run);
592593
run.builder.ensure(Std {
593594
stage: run.builder.top_stage,
594595
target: run.target,
@@ -597,7 +598,7 @@ impl Step for Std {
597598
} else {
598599
DocumentationFormat::Html
599600
},
600-
crates: run.make_run_crates(Alias::Library),
601+
crates,
601602
});
602603
}
603604

@@ -695,13 +696,6 @@ fn doc_std(
695696
extra_args: &[&str],
696697
requested_crates: &[String],
697698
) {
698-
if builder.no_std(target) == Some(true) {
699-
panic!(
700-
"building std documentation for no_std target {target} is not supported\n\
701-
Set `docs = false` in the config to disable documentation, or pass `--skip library`."
702-
);
703-
}
704-
705699
let compiler = builder.compiler(stage, builder.config.build);
706700

707701
let target_doc_dir_name = if format == DocumentationFormat::Json { "json-doc" } else { "doc" };

0 commit comments

Comments
 (0)