Skip to content

Commit 16fefc5

Browse files
committed
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.
1 parent defd1b3 commit 16fefc5

File tree

5 files changed

+5
-13
lines changed

5 files changed

+5
-13
lines changed

src/bootstrap/build/compile.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,15 +141,10 @@ pub fn rustc<'a>(build: &'a Build, stage: u32, target: &str,
141141

142142
let mut cargo = build.cargo(stage, compiler, Mode::Librustc, Some(target),
143143
"build");
144-
cargo.arg("--features").arg(build.rustc_features(stage))
144+
cargo.arg("--features").arg(build.rustc_features())
145145
.arg("--manifest-path")
146146
.arg(build.src.join("src/rustc/Cargo.toml"));
147147

148-
// In stage0 we may not need to build as many executables
149-
if stage == 0 {
150-
cargo.arg("--bin").arg("rustc");
151-
}
152-
153148
// Set some configuration variables picked up by build scripts and
154149
// the compiler alike
155150
cargo.env("CFG_RELEASE", &build.release)

src/bootstrap/build/doc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ pub fn rustc(build: &Build, stage: u32, host: &str, out: &Path) {
135135
"doc");
136136
cargo.arg("--manifest-path")
137137
.arg(build.src.join("src/rustc/Cargo.toml"))
138-
.arg("--features").arg(build.rustc_features(stage));
138+
.arg("--features").arg(build.rustc_features());
139139
build.run(&mut cargo);
140140
cp_r(&out_dir, out)
141141
}

src/bootstrap/build/mod.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -379,14 +379,11 @@ impl Build {
379379
}
380380

381381
/// Get the space-separated set of activated features for the compiler.
382-
fn rustc_features(&self, stage: u32) -> String {
382+
fn rustc_features(&self) -> String {
383383
let mut features = String::new();
384384
if self.config.use_jemalloc {
385385
features.push_str(" jemalloc");
386386
}
387-
if stage > 0 {
388-
features.push_str(" rustdoc");
389-
}
390387
return features
391388
}
392389

src/librustdoc/html/render.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1454,7 +1454,7 @@ impl<'a> Item<'a> {
14541454
// has anchors for the line numbers that we're linking to.
14551455
} else if self.item.def_id.is_local() {
14561456
self.cx.local_sources.get(&PathBuf::from(&self.item.source.filename)).map(|path| {
1457-
format!("{root}src/{krate}/{path}.html#{href}",
1457+
format!("{root}src/{krate}/{path}#{href}",
14581458
root = self.cx.root_path,
14591459
krate = self.cx.layout.krate,
14601460
path = path,

src/rustc/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ debug-assertions = false
2525
[dependencies]
2626
rustc_back = { path = "../librustc_back" }
2727
rustc_driver = { path = "../librustc_driver" }
28-
rustdoc = { path = "../librustdoc", optional = true }
28+
rustdoc = { path = "../librustdoc" }
2929

3030
[features]
3131
jemalloc = ["rustc_back/jemalloc"]

0 commit comments

Comments
 (0)