Skip to content

Commit 0d116b7

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 23460ab commit 0d116b7

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
@@ -587,6 +587,7 @@ impl Step for Std {
587587
}
588588

589589
fn make_run(run: RunConfig<'_>) {
590+
let crates = compile::std_crates_for_run_make(&run);
590591
run.builder.ensure(Std {
591592
stage: run.builder.top_stage,
592593
target: run.target,
@@ -595,7 +596,7 @@ impl Step for Std {
595596
} else {
596597
DocumentationFormat::Html
597598
},
598-
crates: run.make_run_crates(Alias::Library),
599+
crates,
599600
});
600601
}
601602

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

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

0 commit comments

Comments
 (0)