From 16fefc5ead7d3338acf80f225f0f256a286345c5 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 7 Mar 2016 23:21:05 -0800 Subject: [PATCH] rustbuild: Fix stage1 rustdoc Just always build stage1 rustdoc, it's really not that much more to build as it's essentially just one library. --- src/bootstrap/build/compile.rs | 7 +------ src/bootstrap/build/doc.rs | 2 +- src/bootstrap/build/mod.rs | 5 +---- src/librustdoc/html/render.rs | 2 +- src/rustc/Cargo.toml | 2 +- 5 files changed, 5 insertions(+), 13 deletions(-) diff --git a/src/bootstrap/build/compile.rs b/src/bootstrap/build/compile.rs index c4d6e66b8785..0a293579cf67 100644 --- a/src/bootstrap/build/compile.rs +++ b/src/bootstrap/build/compile.rs @@ -141,15 +141,10 @@ pub fn rustc<'a>(build: &'a Build, stage: u32, target: &str, let mut cargo = build.cargo(stage, compiler, Mode::Librustc, Some(target), "build"); - cargo.arg("--features").arg(build.rustc_features(stage)) + cargo.arg("--features").arg(build.rustc_features()) .arg("--manifest-path") .arg(build.src.join("src/rustc/Cargo.toml")); - // In stage0 we may not need to build as many executables - if stage == 0 { - cargo.arg("--bin").arg("rustc"); - } - // Set some configuration variables picked up by build scripts and // the compiler alike cargo.env("CFG_RELEASE", &build.release) diff --git a/src/bootstrap/build/doc.rs b/src/bootstrap/build/doc.rs index 917860962c9e..ce79a6052591 100644 --- a/src/bootstrap/build/doc.rs +++ b/src/bootstrap/build/doc.rs @@ -135,7 +135,7 @@ pub fn rustc(build: &Build, stage: u32, host: &str, out: &Path) { "doc"); cargo.arg("--manifest-path") .arg(build.src.join("src/rustc/Cargo.toml")) - .arg("--features").arg(build.rustc_features(stage)); + .arg("--features").arg(build.rustc_features()); build.run(&mut cargo); cp_r(&out_dir, out) } diff --git a/src/bootstrap/build/mod.rs b/src/bootstrap/build/mod.rs index 9f24fba5843b..b4fb67beaf91 100644 --- a/src/bootstrap/build/mod.rs +++ b/src/bootstrap/build/mod.rs @@ -379,14 +379,11 @@ impl Build { } /// Get the space-separated set of activated features for the compiler. - fn rustc_features(&self, stage: u32) -> String { + fn rustc_features(&self) -> String { let mut features = String::new(); if self.config.use_jemalloc { features.push_str(" jemalloc"); } - if stage > 0 { - features.push_str(" rustdoc"); - } return features } diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index 2cb2b299e401..eb2d78689451 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -1454,7 +1454,7 @@ impl<'a> Item<'a> { // has anchors for the line numbers that we're linking to. } else if self.item.def_id.is_local() { self.cx.local_sources.get(&PathBuf::from(&self.item.source.filename)).map(|path| { - format!("{root}src/{krate}/{path}.html#{href}", + format!("{root}src/{krate}/{path}#{href}", root = self.cx.root_path, krate = self.cx.layout.krate, path = path, diff --git a/src/rustc/Cargo.toml b/src/rustc/Cargo.toml index f1abf35cbc0c..7431c35efba0 100644 --- a/src/rustc/Cargo.toml +++ b/src/rustc/Cargo.toml @@ -25,7 +25,7 @@ debug-assertions = false [dependencies] rustc_back = { path = "../librustc_back" } rustc_driver = { path = "../librustc_driver" } -rustdoc = { path = "../librustdoc", optional = true } +rustdoc = { path = "../librustdoc" } [features] jemalloc = ["rustc_back/jemalloc"]