Skip to content

Commit

Permalink
Unrolled build for rust-lang#125781
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#125781 - onur-ozkan:improve-tool-builder, r=albertlarsan68

prefer `compile::stream_cargo` for building tools

Previously, we were running bare commands for `ToolBuild` step and were unable to utilize some of the flags which  are already handled by `compile::stream_cargo`.

This change makes `ToolBuild` to use `compile::stream_cargo`, allowing us to benefit from the flags supported by the bootstrap cargo.

Resolves rust-lang#125666
  • Loading branch information
rust-timer authored Jun 7, 2024
2 parents 4dc24ae + c76e59e commit 2564806
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/bootstrap/src/core/build_steps/tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ use crate::core::builder;
use crate::core::builder::{Builder, Cargo as CargoCommand, RunConfig, ShouldRun, Step};
use crate::core::config::TargetSelection;
use crate::utils::channel::GitInfo;
use crate::utils::exec::BootstrapCommand;
use crate::utils::helpers::output;
use crate::utils::helpers::{add_dylib_path, exe, t};
use crate::Compiler;
Expand Down Expand Up @@ -110,9 +109,8 @@ impl Step for ToolBuild {
&self.target,
);

let mut cargo = Command::from(cargo);
// we check this below
let build_success = builder.run_cmd(BootstrapCommand::from(&mut cargo).allow_failure());
let build_success = compile::stream_cargo(builder, cargo, vec![], &mut |_| {});

builder.save_toolstate(
tool,
Expand Down

0 comments on commit 2564806

Please sign in to comment.