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.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
This commit is contained in:
onur-ozkan 2024-06-06 20:06:20 +03:00
parent 50297bb417
commit c76e59e712

View file

@ -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;
@ -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,