@@ -25,7 +25,7 @@ use crate::core::build_steps::tool::{self, Tool};
2525use crate :: core:: builder:: { Builder , Kind , RunConfig , ShouldRun , Step } ;
2626use crate :: core:: config:: TargetSelection ;
2727use crate :: utils:: channel:: { self , Info } ;
28- use crate :: utils:: exec:: BootstrapCommand ;
28+ use crate :: utils:: exec:: { command , BootstrapCommand } ;
2929use crate :: utils:: helpers:: {
3030 exe, is_dylib, move_file, t, target_supports_cranelift_backend, timeit,
3131} ;
@@ -180,7 +180,7 @@ fn make_win_dist(
180180 }
181181
182182 //Ask gcc where it keeps its stuff
183- let mut cmd = BootstrapCommand :: new ( builder. cc ( target) ) ;
183+ let mut cmd = command ( builder. cc ( target) ) ;
184184 cmd. arg ( "-print-search-dirs" ) ;
185185 let gcc_out = cmd. capture_stdout ( ) . run ( builder) . stdout ( ) ;
186186
@@ -1023,7 +1023,7 @@ impl Step for PlainSourceTarball {
10231023 }
10241024
10251025 // Vendor all Cargo dependencies
1026- let mut cmd = BootstrapCommand :: new ( & builder. initial_cargo ) ;
1026+ let mut cmd = command ( & builder. initial_cargo ) ;
10271027 cmd. arg ( "vendor" )
10281028 . arg ( "--versioned-dirs" )
10291029 . arg ( "--sync" )
@@ -1599,7 +1599,7 @@ impl Step for Extended {
15991599 let _ = fs:: remove_dir_all ( & pkg) ;
16001600
16011601 let pkgbuild = |component : & str | {
1602- let mut cmd = BootstrapCommand :: new ( "pkgbuild" ) ;
1602+ let mut cmd = command ( "pkgbuild" ) ;
16031603 cmd. arg ( "--identifier" )
16041604 . arg ( format ! ( "org.rust-lang.{}" , component) )
16051605 . arg ( "--scripts" )
@@ -1636,7 +1636,7 @@ impl Step for Extended {
16361636 builder. create_dir ( & pkg. join ( "res" ) ) ;
16371637 builder. create ( & pkg. join ( "res/LICENSE.txt" ) , & license) ;
16381638 builder. install ( & etc. join ( "gfx/rust-logo.png" ) , & pkg. join ( "res" ) , 0o644 ) ;
1639- let mut cmd = BootstrapCommand :: new ( "productbuild" ) ;
1639+ let mut cmd = command ( "productbuild" ) ;
16401640 cmd. arg ( "--distribution" )
16411641 . arg ( xform ( & etc. join ( "pkg/Distribution.xml" ) ) )
16421642 . arg ( "--resources" )
@@ -1703,7 +1703,7 @@ impl Step for Extended {
17031703 let light = wix. join ( "bin/light.exe" ) ;
17041704
17051705 let heat_flags = [ "-nologo" , "-gg" , "-sfrag" , "-srd" , "-sreg" ] ;
1706- BootstrapCommand :: new ( & heat)
1706+ command ( & heat)
17071707 . current_dir ( & exe)
17081708 . arg ( "dir" )
17091709 . arg ( "rustc" )
@@ -1718,7 +1718,7 @@ impl Step for Extended {
17181718 . arg ( exe. join ( "RustcGroup.wxs" ) )
17191719 . run ( builder) ;
17201720 if built_tools. contains ( "rust-docs" ) {
1721- BootstrapCommand :: new ( & heat)
1721+ command ( & heat)
17221722 . current_dir ( & exe)
17231723 . arg ( "dir" )
17241724 . arg ( "rust-docs" )
@@ -1735,7 +1735,7 @@ impl Step for Extended {
17351735 . arg ( etc. join ( "msi/squash-components.xsl" ) )
17361736 . run ( builder) ;
17371737 }
1738- BootstrapCommand :: new ( & heat)
1738+ command ( & heat)
17391739 . current_dir ( & exe)
17401740 . arg ( "dir" )
17411741 . arg ( "cargo" )
@@ -1751,7 +1751,7 @@ impl Step for Extended {
17511751 . arg ( "-t" )
17521752 . arg ( etc. join ( "msi/remove-duplicates.xsl" ) )
17531753 . run ( builder) ;
1754- BootstrapCommand :: new ( & heat)
1754+ command ( & heat)
17551755 . current_dir ( & exe)
17561756 . arg ( "dir" )
17571757 . arg ( "rust-std" )
@@ -1766,7 +1766,7 @@ impl Step for Extended {
17661766 . arg ( exe. join ( "StdGroup.wxs" ) )
17671767 . run ( builder) ;
17681768 if built_tools. contains ( "rust-analyzer" ) {
1769- BootstrapCommand :: new ( & heat)
1769+ command ( & heat)
17701770 . current_dir ( & exe)
17711771 . arg ( "dir" )
17721772 . arg ( "rust-analyzer" )
@@ -1784,7 +1784,7 @@ impl Step for Extended {
17841784 . run ( builder) ;
17851785 }
17861786 if built_tools. contains ( "clippy" ) {
1787- BootstrapCommand :: new ( & heat)
1787+ command ( & heat)
17881788 . current_dir ( & exe)
17891789 . arg ( "dir" )
17901790 . arg ( "clippy" )
@@ -1802,7 +1802,7 @@ impl Step for Extended {
18021802 . run ( builder) ;
18031803 }
18041804 if built_tools. contains ( "miri" ) {
1805- BootstrapCommand :: new ( & heat)
1805+ command ( & heat)
18061806 . current_dir ( & exe)
18071807 . arg ( "dir" )
18081808 . arg ( "miri" )
@@ -1819,7 +1819,7 @@ impl Step for Extended {
18191819 . arg ( etc. join ( "msi/remove-duplicates.xsl" ) )
18201820 . run ( builder) ;
18211821 }
1822- BootstrapCommand :: new ( & heat)
1822+ command ( & heat)
18231823 . current_dir ( & exe)
18241824 . arg ( "dir" )
18251825 . arg ( "rust-analysis" )
@@ -1836,7 +1836,7 @@ impl Step for Extended {
18361836 . arg ( etc. join ( "msi/remove-duplicates.xsl" ) )
18371837 . run ( builder) ;
18381838 if target. ends_with ( "windows-gnu" ) {
1839- BootstrapCommand :: new ( & heat)
1839+ command ( & heat)
18401840 . current_dir ( & exe)
18411841 . arg ( "dir" )
18421842 . arg ( "rust-mingw" )
@@ -1855,7 +1855,7 @@ impl Step for Extended {
18551855 let candle = |input : & Path | {
18561856 let output = exe. join ( input. file_stem ( ) . unwrap ( ) ) . with_extension ( "wixobj" ) ;
18571857 let arch = if target. contains ( "x86_64" ) { "x64" } else { "x86" } ;
1858- let mut cmd = BootstrapCommand :: new ( & candle) ;
1858+ let mut cmd = command ( & candle) ;
18591859 cmd. current_dir ( & exe)
18601860 . arg ( "-nologo" )
18611861 . arg ( "-dRustcDir=rustc" )
@@ -1916,7 +1916,7 @@ impl Step for Extended {
19161916
19171917 builder. info ( & format ! ( "building `msi` installer with {light:?}" ) ) ;
19181918 let filename = format ! ( "{}-{}.msi" , pkgname( builder, "rust" ) , target. triple) ;
1919- let mut cmd = BootstrapCommand :: new ( & light) ;
1919+ let mut cmd = command ( & light) ;
19201920 cmd. arg ( "-nologo" )
19211921 . arg ( "-ext" )
19221922 . arg ( "WixUIExtension" )
@@ -2069,7 +2069,7 @@ fn maybe_install_llvm(
20692069 } else if let llvm:: LlvmBuildStatus :: AlreadyBuilt ( llvm:: LlvmResult { llvm_config, .. } ) =
20702070 llvm:: prebuilt_llvm_config ( builder, target)
20712071 {
2072- let mut cmd = BootstrapCommand :: new ( llvm_config) ;
2072+ let mut cmd = command ( llvm_config) ;
20732073 cmd. arg ( "--libfiles" ) ;
20742074 builder. verbose ( || println ! ( "running {cmd:?}" ) ) ;
20752075 let files = if builder. config . dry_run ( ) {
0 commit comments