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:
@@ -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),
|
let mut cargo = build.cargo(stage, compiler, Mode::Librustc, Some(target),
|
||||||
"build");
|
"build");
|
||||||
cargo.arg("--features").arg(build.rustc_features(stage))
|
cargo.arg("--features").arg(build.rustc_features())
|
||||||
.arg("--manifest-path")
|
.arg("--manifest-path")
|
||||||
.arg(build.src.join("src/rustc/Cargo.toml"));
|
.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
|
// Set some configuration variables picked up by build scripts and
|
||||||
// the compiler alike
|
// the compiler alike
|
||||||
cargo.env("CFG_RELEASE", &build.release)
|
cargo.env("CFG_RELEASE", &build.release)
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ pub fn rustc(build: &Build, stage: u32, host: &str, out: &Path) {
|
|||||||
"doc");
|
"doc");
|
||||||
cargo.arg("--manifest-path")
|
cargo.arg("--manifest-path")
|
||||||
.arg(build.src.join("src/rustc/Cargo.toml"))
|
.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);
|
build.run(&mut cargo);
|
||||||
cp_r(&out_dir, out)
|
cp_r(&out_dir, out)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -379,14 +379,11 @@ impl Build {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Get the space-separated set of activated features for the compiler.
|
/// 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();
|
let mut features = String::new();
|
||||||
if self.config.use_jemalloc {
|
if self.config.use_jemalloc {
|
||||||
features.push_str(" jemalloc");
|
features.push_str(" jemalloc");
|
||||||
}
|
}
|
||||||
if stage > 0 {
|
|
||||||
features.push_str(" rustdoc");
|
|
||||||
}
|
|
||||||
return features
|
return features
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1454,7 +1454,7 @@ impl<'a> Item<'a> {
|
|||||||
// has anchors for the line numbers that we're linking to.
|
// has anchors for the line numbers that we're linking to.
|
||||||
} else if self.item.def_id.is_local() {
|
} else if self.item.def_id.is_local() {
|
||||||
self.cx.local_sources.get(&PathBuf::from(&self.item.source.filename)).map(|path| {
|
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,
|
root = self.cx.root_path,
|
||||||
krate = self.cx.layout.krate,
|
krate = self.cx.layout.krate,
|
||||||
path = path,
|
path = path,
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ debug-assertions = false
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
rustc_back = { path = "../librustc_back" }
|
rustc_back = { path = "../librustc_back" }
|
||||||
rustc_driver = { path = "../librustc_driver" }
|
rustc_driver = { path = "../librustc_driver" }
|
||||||
rustdoc = { path = "../librustdoc", optional = true }
|
rustdoc = { path = "../librustdoc" }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
jemalloc = ["rustc_back/jemalloc"]
|
jemalloc = ["rustc_back/jemalloc"]
|
||||||
|
|||||||
Reference in New Issue
Block a user