diff options
| author | Joshua Nelson <jyn514@gmail.com> | 2020-12-24 20:23:54 -0500 |
|---|---|---|
| committer | Joshua Nelson <jyn514@gmail.com> | 2020-12-24 20:25:40 -0500 |
| commit | 82acbc8a49799868613a070085dc462f38ed78d5 (patch) | |
| tree | 55afe8b071fcc30f1e85cc571b1a43260353599a | |
| parent | 3ffea60dd5a2260004cc4f487401ae7c7db1aa0e (diff) | |
| download | rust-82acbc8a49799868613a070085dc462f38ed78d5.tar.gz rust-82acbc8a49799868613a070085dc462f38ed78d5.zip | |
Document rustc_macros on nightly-rustc
| -rw-r--r-- | src/bootstrap/doc.rs | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs index 8cacc2512ef..826ad2e23c8 100644 --- a/src/bootstrap/doc.rs +++ b/src/bootstrap/doc.rs @@ -500,18 +500,17 @@ impl Step for Rustc { let target = self.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 { builder.info("\tskipping - compiler/librustdoc docs disabled"); 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. + let compiler = builder.compiler(stage, builder.config.build); builder.ensure(compile::Rustc { compiler, target }); // This uses a shared directory so that librustdoc documentation gets @@ -521,6 +520,10 @@ impl Step for Rustc { // merging the search index, or generating local (relative) links. let out_dir = builder.stage_out(compiler, Mode::Rustc).join(target.triple).join("doc"); 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. let mut cargo = builder.cargo(compiler, Mode::Rustc, SourceType::InTree, target, "doc"); |
