@@ -26,6 +26,7 @@ use crate::core::build_steps::tool::{self, Tool};
2626use crate :: core:: builder:: { Builder , Kind , RunConfig , ShouldRun , Step } ;
2727use crate :: core:: config:: TargetSelection ;
2828use crate :: utils:: channel:: { self , Info } ;
29+ use crate :: utils:: exec:: BootstrapCommand ;
2930use crate :: utils:: helpers:: {
3031 exe, is_dylib, move_file, output, t, target_supports_cranelift_backend, timeit,
3132} ;
@@ -1599,14 +1600,14 @@ impl Step for Extended {
15991600 let _ = fs:: remove_dir_all ( & pkg) ;
16001601
16011602 let pkgbuild = |component : & str | {
1602- let mut cmd = Command :: new ( "pkgbuild" ) ;
1603+ let mut cmd = BootstrapCommand :: new ( "pkgbuild" ) ;
16031604 cmd. arg ( "--identifier" )
16041605 . arg ( format ! ( "org.rust-lang.{}" , component) )
16051606 . arg ( "--scripts" )
16061607 . arg ( pkg. join ( component) )
16071608 . arg ( "--nopayload" )
16081609 . arg ( pkg. join ( component) . with_extension ( "pkg" ) ) ;
1609- builder. run ( & mut cmd) ;
1610+ builder. run ( cmd) ;
16101611 } ;
16111612
16121613 let prepare = |name : & str | {
@@ -1636,7 +1637,7 @@ impl Step for Extended {
16361637 builder. create_dir ( & pkg. join ( "res" ) ) ;
16371638 builder. create ( & pkg. join ( "res/LICENSE.txt" ) , & license) ;
16381639 builder. install ( & etc. join ( "gfx/rust-logo.png" ) , & pkg. join ( "res" ) , 0o644 ) ;
1639- let mut cmd = Command :: new ( "productbuild" ) ;
1640+ let mut cmd = BootstrapCommand :: new ( "productbuild" ) ;
16401641 cmd. arg ( "--distribution" )
16411642 . arg ( xform ( & etc. join ( "pkg/Distribution.xml" ) ) )
16421643 . arg ( "--resources" )
@@ -1649,7 +1650,7 @@ impl Step for Extended {
16491650 . arg ( "--package-path" )
16501651 . arg ( & pkg) ;
16511652 let _time = timeit ( builder) ;
1652- builder. run ( & mut cmd) ;
1653+ builder. run ( cmd) ;
16531654 }
16541655
16551656 if target. is_windows ( ) {
@@ -1864,7 +1865,7 @@ impl Step for Extended {
18641865 let candle = |input : & Path | {
18651866 let output = exe. join ( input. file_stem ( ) . unwrap ( ) ) . with_extension ( "wixobj" ) ;
18661867 let arch = if target. contains ( "x86_64" ) { "x64" } else { "x86" } ;
1867- let mut cmd = Command :: new ( & candle) ;
1868+ let mut cmd = BootstrapCommand :: new ( & candle) ;
18681869 cmd. current_dir ( & exe)
18691870 . arg ( "-nologo" )
18701871 . arg ( "-dRustcDir=rustc" )
@@ -1893,7 +1894,7 @@ impl Step for Extended {
18931894 if target. ends_with ( "windows-gnu" ) {
18941895 cmd. arg ( "-dGccDir=rust-mingw" ) ;
18951896 }
1896- builder. run ( & mut cmd) ;
1897+ builder. run ( cmd) ;
18971898 } ;
18981899 candle ( & xform ( & etc. join ( "msi/rust.wxs" ) ) ) ;
18991900 candle ( & etc. join ( "msi/ui.wxs" ) ) ;
@@ -1925,7 +1926,7 @@ impl Step for Extended {
19251926
19261927 builder. info ( & format ! ( "building `msi` installer with {light:?}" ) ) ;
19271928 let filename = format ! ( "{}-{}.msi" , pkgname( builder, "rust" ) , target. triple) ;
1928- let mut cmd = Command :: new ( & light) ;
1929+ let mut cmd = BootstrapCommand :: new ( & light) ;
19291930 cmd. arg ( "-nologo" )
19301931 . arg ( "-ext" )
19311932 . arg ( "WixUIExtension" )
@@ -1962,7 +1963,7 @@ impl Step for Extended {
19621963 cmd. arg ( "-sice:ICE57" ) ;
19631964
19641965 let _time = timeit ( builder) ;
1965- builder. run ( & mut cmd) ;
1966+ builder. run ( cmd) ;
19661967
19671968 if !builder. config . dry_run ( ) {
19681969 t ! ( move_file( exe. join( & filename) , distdir( builder) . join( & filename) ) ) ;
@@ -1971,7 +1972,7 @@ impl Step for Extended {
19711972 }
19721973}
19731974
1974- fn add_env ( builder : & Builder < ' _ > , cmd : & mut Command , target : TargetSelection ) {
1975+ fn add_env ( builder : & Builder < ' _ > , cmd : & mut BootstrapCommand , target : TargetSelection ) {
19751976 let mut parts = builder. version . split ( '.' ) ;
19761977 cmd. env ( "CFG_RELEASE_INFO" , builder. rust_version ( ) )
19771978 . env ( "CFG_RELEASE_NUM" , & builder. version )
0 commit comments