@@ -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} ;
@@ -1595,14 +1596,14 @@ impl Step for Extended {
15951596 let _ = fs:: remove_dir_all ( & pkg) ;
15961597
15971598 let pkgbuild = |component : & str | {
1598- let mut cmd = Command :: new ( "pkgbuild" ) ;
1599+ let mut cmd = BootstrapCommand :: new ( "pkgbuild" ) ;
15991600 cmd. arg ( "--identifier" )
16001601 . arg ( format ! ( "org.rust-lang.{}" , component) )
16011602 . arg ( "--scripts" )
16021603 . arg ( pkg. join ( component) )
16031604 . arg ( "--nopayload" )
16041605 . arg ( pkg. join ( component) . with_extension ( "pkg" ) ) ;
1605- builder. run ( & mut cmd) ;
1606+ builder. run ( cmd) ;
16061607 } ;
16071608
16081609 let prepare = |name : & str | {
@@ -1632,7 +1633,7 @@ impl Step for Extended {
16321633 builder. create_dir ( & pkg. join ( "res" ) ) ;
16331634 builder. create ( & pkg. join ( "res/LICENSE.txt" ) , & license) ;
16341635 builder. install ( & etc. join ( "gfx/rust-logo.png" ) , & pkg. join ( "res" ) , 0o644 ) ;
1635- let mut cmd = Command :: new ( "productbuild" ) ;
1636+ let mut cmd = BootstrapCommand :: new ( "productbuild" ) ;
16361637 cmd. arg ( "--distribution" )
16371638 . arg ( xform ( & etc. join ( "pkg/Distribution.xml" ) ) )
16381639 . arg ( "--resources" )
@@ -1645,7 +1646,7 @@ impl Step for Extended {
16451646 . arg ( "--package-path" )
16461647 . arg ( & pkg) ;
16471648 let _time = timeit ( builder) ;
1648- builder. run ( & mut cmd) ;
1649+ builder. run ( cmd) ;
16491650 }
16501651
16511652 if target. is_windows ( ) {
@@ -1860,7 +1861,7 @@ impl Step for Extended {
18601861 let candle = |input : & Path | {
18611862 let output = exe. join ( input. file_stem ( ) . unwrap ( ) ) . with_extension ( "wixobj" ) ;
18621863 let arch = if target. contains ( "x86_64" ) { "x64" } else { "x86" } ;
1863- let mut cmd = Command :: new ( & candle) ;
1864+ let mut cmd = BootstrapCommand :: new ( & candle) ;
18641865 cmd. current_dir ( & exe)
18651866 . arg ( "-nologo" )
18661867 . arg ( "-dRustcDir=rustc" )
@@ -1889,7 +1890,7 @@ impl Step for Extended {
18891890 if target. ends_with ( "windows-gnu" ) {
18901891 cmd. arg ( "-dGccDir=rust-mingw" ) ;
18911892 }
1892- builder. run ( & mut cmd) ;
1893+ builder. run ( cmd) ;
18931894 } ;
18941895 candle ( & xform ( & etc. join ( "msi/rust.wxs" ) ) ) ;
18951896 candle ( & etc. join ( "msi/ui.wxs" ) ) ;
@@ -1921,7 +1922,7 @@ impl Step for Extended {
19211922
19221923 builder. info ( & format ! ( "building `msi` installer with {light:?}" ) ) ;
19231924 let filename = format ! ( "{}-{}.msi" , pkgname( builder, "rust" ) , target. triple) ;
1924- let mut cmd = Command :: new ( & light) ;
1925+ let mut cmd = BootstrapCommand :: new ( & light) ;
19251926 cmd. arg ( "-nologo" )
19261927 . arg ( "-ext" )
19271928 . arg ( "WixUIExtension" )
@@ -1958,7 +1959,7 @@ impl Step for Extended {
19581959 cmd. arg ( "-sice:ICE57" ) ;
19591960
19601961 let _time = timeit ( builder) ;
1961- builder. run ( & mut cmd) ;
1962+ builder. run ( cmd) ;
19621963
19631964 if !builder. config . dry_run ( ) {
19641965 t ! ( move_file( exe. join( & filename) , distdir( builder) . join( & filename) ) ) ;
@@ -1967,7 +1968,7 @@ impl Step for Extended {
19671968 }
19681969}
19691970
1970- fn add_env ( builder : & Builder < ' _ > , cmd : & mut Command , target : TargetSelection ) {
1971+ fn add_env ( builder : & Builder < ' _ > , cmd : & mut BootstrapCommand , target : TargetSelection ) {
19711972 let mut parts = builder. version . split ( '.' ) ;
19721973 cmd. env ( "CFG_RELEASE_INFO" , builder. rust_version ( ) )
19731974 . env ( "CFG_RELEASE_NUM" , & builder. version )
0 commit comments