mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
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>
This commit is contained in:
parent
6e247195c6
commit
4c87e84f99
@ -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" };
|
||||
|
Loading…
Reference in New Issue
Block a user