diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2016-03-07 23:21:05 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2016-03-08 13:44:14 -0800 |
| commit | 16fefc5ead7d3338acf80f225f0f256a286345c5 (patch) | |
| tree | 370c2e19041d1ce6377b17f4f538c71a6c5db858 | |
| parent | defd1b3392df2434ae67e0885cba16cdb9a2d5b4 (diff) | |
| download | rust-16fefc5ead7d3338acf80f225f0f256a286345c5.tar.gz rust-16fefc5ead7d3338acf80f225f0f256a286345c5.zip | |
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.
| -rw-r--r-- | src/bootstrap/build/compile.rs | 7 | ||||
| -rw-r--r-- | src/bootstrap/build/doc.rs | 2 | ||||
| -rw-r--r-- | src/bootstrap/build/mod.rs | 5 | ||||
| -rw-r--r-- | src/librustdoc/html/render.rs | 2 | ||||
| -rw-r--r-- | 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 c4d6e66b878..0a293579cf6 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 917860962c9..ce79a605259 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 9f24fba5843..b4fb67beaf9 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 2cb2b299e40..eb2d7868945 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 f1abf35cbc0..7431c35efba 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"] |
