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.
This commit is contained in:
Alex Crichton 2016-03-07 23:21:05 -08:00
parent defd1b3392
commit 16fefc5ead
5 changed files with 5 additions and 13 deletions

View file

@ -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)

View file

@ -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)
}

View file

@ -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
}

View file

@ -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,

View file

@ -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"]