Skip to content

Commit 367e783

Browse files
committedDec 6, 2018
Auto merge of #56557 - pietroalbini:rollup, r=pietroalbini
Rollup of 11 pull requests Successful merges: - #56315 (Rustdoc inline macro reexport) - #56332 ([rustdoc] Specific crate search) - #56362 (Stabilise exhaustive integer patterns) - #56426 (libsyntax_pos: A few tweaks) - #56441 (rustbuild: Fix issues with compiler docs) - #56446 (pass the parameter environment to `traits::find_associated_item`) - #56500 (cleanup: remove static lifetimes from consts) - #56525 (Avoid extra copy and syscall in std::env::current_exe) - #56528 (Remove unused dependency (rustc_lint -> rustc_mir)) - #56548 (Optimized string FromIterator + Extend impls) - #56553 (Don't print the profiling summary to stdout when -Zprofile-json is set) Failed merges: r? @ghost
2 parents 128a1fa + cd1ee5e commit 367e783

File tree

100 files changed

+700
-400
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+700
-400
lines changed
 

‎Cargo.lock

-1
Original file line numberDiff line numberDiff line change
@@ -2352,7 +2352,6 @@ dependencies = [
23522352
"log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
23532353
"rustc 0.0.0",
23542354
"rustc_data_structures 0.0.0",
2355-
"rustc_mir 0.0.0",
23562355
"rustc_target 0.0.0",
23572356
"syntax 0.0.0",
23582357
"syntax_pos 0.0.0",

‎src/bootstrap/doc.rs

+11-6
Original file line numberDiff line numberDiff line change
@@ -697,9 +697,6 @@ impl Step for Rustc {
697697
return;
698698
}
699699

700-
// Build libstd docs so that we generate relative links.
701-
builder.ensure(Std { stage, target });
702-
703700
// Build rustc.
704701
builder.ensure(compile::Rustc { compiler, target });
705702

@@ -718,12 +715,16 @@ impl Step for Rustc {
718715

719716
// Find dependencies for top level crates.
720717
let mut compiler_crates = HashSet::new();
721-
for root_crate in &["rustc", "rustc_driver", "rustc_codegen_llvm"] {
718+
for root_crate in &["rustc_driver", "rustc_codegen_llvm", "rustc_codegen_ssa"] {
722719
let interned_root_crate = INTERNER.intern_str(root_crate);
723720
find_compiler_crates(builder, &interned_root_crate, &mut compiler_crates);
724721
}
725722

726723
for krate in &compiler_crates {
724+
// Create all crate output directories first to make sure rustdoc uses
725+
// relative links.
726+
// FIXME: Cargo should probably do this itself.
727+
t!(fs::create_dir_all(out_dir.join(krate)));
727728
cargo.arg("-p").arg(krate);
728729
}
729730

@@ -797,8 +798,8 @@ impl Step for Rustdoc {
797798
return;
798799
}
799800

800-
// Build libstd docs so that we generate relative links.
801-
builder.ensure(Std { stage, target });
801+
// Build rustc docs so that we generate relative links.
802+
builder.ensure(Rustc { stage, target });
802803

803804
// Build rustdoc.
804805
builder.ensure(tool::Rustdoc { host: compiler.host });
@@ -822,6 +823,10 @@ impl Step for Rustdoc {
822823
&[]
823824
);
824825

826+
// Only include compiler crates, no dependencies of those, such as `libc`.
827+
cargo.arg("--no-deps");
828+
cargo.arg("-p").arg("rustdoc");
829+
825830
cargo.env("RUSTDOCFLAGS", "--document-private-items");
826831
builder.run(&mut cargo);
827832
}

0 commit comments

Comments
 (0)
Please sign in to comment.