@@ -26,6 +26,7 @@ use crate::core::build_steps::tool::{self, Tool};
26
26
use crate :: core:: builder:: { Builder , Kind , RunConfig , ShouldRun , Step } ;
27
27
use crate :: core:: config:: TargetSelection ;
28
28
use crate :: utils:: channel:: { self , Info } ;
29
+ use crate :: utils:: exec:: BootstrapCommand ;
29
30
use crate :: utils:: helpers:: {
30
31
exe, is_dylib, move_file, output, t, target_supports_cranelift_backend, timeit,
31
32
} ;
@@ -1595,14 +1596,14 @@ impl Step for Extended {
1595
1596
let _ = fs:: remove_dir_all ( & pkg) ;
1596
1597
1597
1598
let pkgbuild = |component : & str | {
1598
- let mut cmd = Command :: new ( "pkgbuild" ) ;
1599
+ let mut cmd = BootstrapCommand :: new ( "pkgbuild" ) ;
1599
1600
cmd. arg ( "--identifier" )
1600
1601
. arg ( format ! ( "org.rust-lang.{}" , component) )
1601
1602
. arg ( "--scripts" )
1602
1603
. arg ( pkg. join ( component) )
1603
1604
. arg ( "--nopayload" )
1604
1605
. arg ( pkg. join ( component) . with_extension ( "pkg" ) ) ;
1605
- builder. run ( & mut cmd) ;
1606
+ builder. run ( cmd) ;
1606
1607
} ;
1607
1608
1608
1609
let prepare = |name : & str | {
@@ -1632,7 +1633,7 @@ impl Step for Extended {
1632
1633
builder. create_dir ( & pkg. join ( "res" ) ) ;
1633
1634
builder. create ( & pkg. join ( "res/LICENSE.txt" ) , & license) ;
1634
1635
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" ) ;
1636
1637
cmd. arg ( "--distribution" )
1637
1638
. arg ( xform ( & etc. join ( "pkg/Distribution.xml" ) ) )
1638
1639
. arg ( "--resources" )
@@ -1645,7 +1646,7 @@ impl Step for Extended {
1645
1646
. arg ( "--package-path" )
1646
1647
. arg ( & pkg) ;
1647
1648
let _time = timeit ( builder) ;
1648
- builder. run ( & mut cmd) ;
1649
+ builder. run ( cmd) ;
1649
1650
}
1650
1651
1651
1652
if target. is_windows ( ) {
@@ -1860,7 +1861,7 @@ impl Step for Extended {
1860
1861
let candle = |input : & Path | {
1861
1862
let output = exe. join ( input. file_stem ( ) . unwrap ( ) ) . with_extension ( "wixobj" ) ;
1862
1863
let arch = if target. contains ( "x86_64" ) { "x64" } else { "x86" } ;
1863
- let mut cmd = Command :: new ( & candle) ;
1864
+ let mut cmd = BootstrapCommand :: new ( & candle) ;
1864
1865
cmd. current_dir ( & exe)
1865
1866
. arg ( "-nologo" )
1866
1867
. arg ( "-dRustcDir=rustc" )
@@ -1889,7 +1890,7 @@ impl Step for Extended {
1889
1890
if target. ends_with ( "windows-gnu" ) {
1890
1891
cmd. arg ( "-dGccDir=rust-mingw" ) ;
1891
1892
}
1892
- builder. run ( & mut cmd) ;
1893
+ builder. run ( cmd) ;
1893
1894
} ;
1894
1895
candle ( & xform ( & etc. join ( "msi/rust.wxs" ) ) ) ;
1895
1896
candle ( & etc. join ( "msi/ui.wxs" ) ) ;
@@ -1921,7 +1922,7 @@ impl Step for Extended {
1921
1922
1922
1923
builder. info ( & format ! ( "building `msi` installer with {light:?}" ) ) ;
1923
1924
let filename = format ! ( "{}-{}.msi" , pkgname( builder, "rust" ) , target. triple) ;
1924
- let mut cmd = Command :: new ( & light) ;
1925
+ let mut cmd = BootstrapCommand :: new ( & light) ;
1925
1926
cmd. arg ( "-nologo" )
1926
1927
. arg ( "-ext" )
1927
1928
. arg ( "WixUIExtension" )
@@ -1958,7 +1959,7 @@ impl Step for Extended {
1958
1959
cmd. arg ( "-sice:ICE57" ) ;
1959
1960
1960
1961
let _time = timeit ( builder) ;
1961
- builder. run ( & mut cmd) ;
1962
+ builder. run ( cmd) ;
1962
1963
1963
1964
if !builder. config . dry_run ( ) {
1964
1965
t ! ( move_file( exe. join( & filename) , distdir( builder) . join( & filename) ) ) ;
@@ -1967,7 +1968,7 @@ impl Step for Extended {
1967
1968
}
1968
1969
}
1969
1970
1970
- fn add_env ( builder : & Builder < ' _ > , cmd : & mut Command , target : TargetSelection ) {
1971
+ fn add_env ( builder : & Builder < ' _ > , cmd : & mut BootstrapCommand , target : TargetSelection ) {
1971
1972
let mut parts = builder. version . split ( '.' ) ;
1972
1973
cmd. env ( "CFG_RELEASE_INFO" , builder. rust_version ( ) )
1973
1974
. env ( "CFG_RELEASE_NUM" , & builder. version )
0 commit comments