Rollup merge of #80362 - jyn514:rustc-macros, r=ehuss
Document rustc_macros on nightly-rustc Fixes https://github.com/rust-lang/rust/issues/80345. ![image](https://user-images.githubusercontent.com/23638587/103113442-b7ba2d00-4628-11eb-8a4d-c542f2d170e1.png) ![image](https://user-images.githubusercontent.com/23638587/103113448-bc7ee100-4628-11eb-8657-2d72e88de656.png) r? ``@ehuss``
This commit is contained in:
commit
18be436550
@ -500,18 +500,17 @@ fn run(self, builder: &Builder<'_>) {
|
|||||||
let target = self.target;
|
let target = self.target;
|
||||||
builder.info(&format!("Documenting stage{} compiler ({})", stage, target));
|
builder.info(&format!("Documenting stage{} compiler ({})", stage, target));
|
||||||
|
|
||||||
// This is the intended out directory for compiler documentation.
|
|
||||||
let out = builder.compiler_doc_out(target);
|
|
||||||
t!(fs::create_dir_all(&out));
|
|
||||||
|
|
||||||
let compiler = builder.compiler(stage, builder.config.build);
|
|
||||||
|
|
||||||
if !builder.config.compiler_docs {
|
if !builder.config.compiler_docs {
|
||||||
builder.info("\tskipping - compiler/librustdoc docs disabled");
|
builder.info("\tskipping - compiler/librustdoc docs disabled");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This is the intended out directory for compiler documentation.
|
||||||
|
let out = builder.compiler_doc_out(target);
|
||||||
|
t!(fs::create_dir_all(&out));
|
||||||
|
|
||||||
// Build rustc.
|
// Build rustc.
|
||||||
|
let compiler = builder.compiler(stage, builder.config.build);
|
||||||
builder.ensure(compile::Rustc { compiler, target });
|
builder.ensure(compile::Rustc { compiler, target });
|
||||||
|
|
||||||
// This uses a shared directory so that librustdoc documentation gets
|
// This uses a shared directory so that librustdoc documentation gets
|
||||||
@ -521,6 +520,10 @@ fn run(self, builder: &Builder<'_>) {
|
|||||||
// merging the search index, or generating local (relative) links.
|
// merging the search index, or generating local (relative) links.
|
||||||
let out_dir = builder.stage_out(compiler, Mode::Rustc).join(target.triple).join("doc");
|
let out_dir = builder.stage_out(compiler, Mode::Rustc).join(target.triple).join("doc");
|
||||||
t!(symlink_dir_force(&builder.config, &out, &out_dir));
|
t!(symlink_dir_force(&builder.config, &out, &out_dir));
|
||||||
|
// Cargo puts proc macros in `target/doc` even if you pass `--target`
|
||||||
|
// explicitly (https://github.com/rust-lang/cargo/issues/7677).
|
||||||
|
let proc_macro_out_dir = builder.stage_out(compiler, Mode::Rustc).join("doc");
|
||||||
|
t!(symlink_dir_force(&builder.config, &out, &proc_macro_out_dir));
|
||||||
|
|
||||||
// Build cargo command.
|
// Build cargo command.
|
||||||
let mut cargo = builder.cargo(compiler, Mode::Rustc, SourceType::InTree, target, "doc");
|
let mut cargo = builder.cargo(compiler, Mode::Rustc, SourceType::InTree, target, "doc");
|
||||||
|
Loading…
Reference in New Issue
Block a user