Skip to content

Commit

Permalink
prefer compile::stream_cargo for building tools
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
onur-ozkan committed Jun 6, 2024
1 parent 50297bb commit c76e59e
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 c76e59e

Please sign in to comment.