Skip to content

Assorted bootstrap cleanups (step 1) #142303

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/bootstrap/src/core/build_steps/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ impl Step for Std {
let stage = self.custom_stage.unwrap_or(builder.top_stage);

let target = self.target;
let compiler = builder.compiler(stage, builder.config.build);
let compiler = builder.compiler(stage, builder.config.host_target);

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

if compiler.stage != 0 {
Expand Down Expand Up @@ -327,7 +327,7 @@ impl Step for CodegenBackend {
return;
}

let compiler = builder.compiler(builder.top_stage, builder.config.build);
let compiler = builder.compiler(builder.top_stage, builder.config.host_target);
let target = self.target;
let backend = self.backend;

Expand Down Expand Up @@ -382,7 +382,7 @@ impl Step for RustAnalyzer {
}

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

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

let compiler = builder.compiler(
if mode == Mode::ToolBootstrap { 0 } else { builder.top_stage },
builder.config.build,
builder.config.host_target,
);

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

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

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

Expand Down
6 changes: 3 additions & 3 deletions src/bootstrap/src/core/build_steps/clippy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ impl Step for Std {
builder.require_submodule("library/stdarch", None);

let target = self.target;
let compiler = builder.compiler(builder.top_stage, builder.config.build);
let compiler = builder.compiler(builder.top_stage, builder.config.host_target);

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

if !builder.download_rustc() {
Expand Down Expand Up @@ -285,7 +285,7 @@ macro_rules! lint_any {
}

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

if !builder.download_rustc() {
Expand Down
Loading
Loading