Skip to content

Commit 216d3a1

Browse files
authored
Unrolled build for #142303
Rollup merge of #142303 - Kobzol:bootstrap-cleanup-1, r=jieyouxu Assorted bootstrap cleanups (step 1) Now that the stage0 redesign has landed, we can finally start cleaning up many things in bootstrap, and lord knows it deserves it! I plan to send many PRs once I figure out an incremental way forward, this is the first one of them. It doesn't actually change anything, just renames stuff and adds more documentation, but the rename is bitrotty, so I wanted to push the PR eagerly. r? `@jieyouxu`
2 parents 1434630 + 20e8325 commit 216d3a1

File tree

31 files changed

+381
-353
lines changed

31 files changed

+381
-353
lines changed

src/bootstrap/src/core/build_steps/check.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ impl Step for Std {
8989
let stage = self.custom_stage.unwrap_or(builder.top_stage);
9090

9191
let target = self.target;
92-
let compiler = builder.compiler(stage, builder.config.build);
92+
let compiler = builder.compiler(stage, builder.config.host_target);
9393

9494
if stage == 0 {
9595
let mut is_explicitly_called =
@@ -244,7 +244,7 @@ impl Step for Rustc {
244244
/// the `compiler` targeting the `target` architecture. The artifacts
245245
/// created will also be linked into the sysroot directory.
246246
fn run(self, builder: &Builder<'_>) {
247-
let compiler = builder.compiler(builder.top_stage, builder.config.build);
247+
let compiler = builder.compiler(builder.top_stage, builder.config.host_target);
248248
let target = self.target;
249249

250250
if compiler.stage != 0 {
@@ -327,7 +327,7 @@ impl Step for CodegenBackend {
327327
return;
328328
}
329329

330-
let compiler = builder.compiler(builder.top_stage, builder.config.build);
330+
let compiler = builder.compiler(builder.top_stage, builder.config.host_target);
331331
let target = self.target;
332332
let backend = self.backend;
333333

@@ -382,7 +382,7 @@ impl Step for RustAnalyzer {
382382
}
383383

384384
fn run(self, builder: &Builder<'_>) {
385-
let compiler = builder.compiler(builder.top_stage, builder.config.build);
385+
let compiler = builder.compiler(builder.top_stage, builder.config.host_target);
386386
let target = self.target;
387387

388388
builder.ensure(Rustc::new(target, builder));
@@ -448,7 +448,7 @@ impl Step for Compiletest {
448448

449449
let compiler = builder.compiler(
450450
if mode == Mode::ToolBootstrap { 0 } else { builder.top_stage },
451-
builder.config.build,
451+
builder.config.host_target,
452452
);
453453

454454
if mode != Mode::ToolBootstrap {
@@ -527,7 +527,7 @@ fn run_tool_check_step(
527527
path: &str,
528528
) {
529529
let display_name = path.rsplit('/').next().unwrap();
530-
let compiler = builder.compiler(builder.top_stage, builder.config.build);
530+
let compiler = builder.compiler(builder.top_stage, builder.config.host_target);
531531

532532
builder.ensure(Rustc::new(target, builder));
533533

@@ -614,7 +614,7 @@ impl Step for CoverageDump {
614614
// Make sure we haven't forgotten any fields, if there are any.
615615
let Self {} = self;
616616
let display_name = "coverage-dump";
617-
let host = builder.config.build;
617+
let host = builder.config.host_target;
618618
let target = host;
619619
let mode = Mode::ToolBootstrap;
620620

src/bootstrap/src/core/build_steps/clippy.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ impl Step for Std {
144144
builder.require_submodule("library/stdarch", None);
145145

146146
let target = self.target;
147-
let compiler = builder.compiler(builder.top_stage, builder.config.build);
147+
let compiler = builder.compiler(builder.top_stage, builder.config.host_target);
148148

149149
let mut cargo = builder::Cargo::new(
150150
builder,
@@ -204,7 +204,7 @@ impl Step for Rustc {
204204
/// This will lint the compiler for a particular stage of the build using
205205
/// the `compiler` targeting the `target` architecture.
206206
fn run(self, builder: &Builder<'_>) {
207-
let compiler = builder.compiler(builder.top_stage, builder.config.build);
207+
let compiler = builder.compiler(builder.top_stage, builder.config.host_target);
208208
let target = self.target;
209209

210210
if !builder.download_rustc() {
@@ -285,7 +285,7 @@ macro_rules! lint_any {
285285
}
286286

287287
fn run(self, builder: &Builder<'_>) -> Self::Output {
288-
let compiler = builder.compiler(builder.top_stage, builder.config.build);
288+
let compiler = builder.compiler(builder.top_stage, builder.config.host_target);
289289
let target = self.target;
290290

291291
if !builder.download_rustc() {

0 commit comments

Comments
 (0)