@@ -25,7 +25,7 @@ use crate::core::build_steps::tool::{self, Tool};
25
25
use crate :: core:: builder:: { Builder , Kind , RunConfig , ShouldRun , Step } ;
26
26
use crate :: core:: config:: TargetSelection ;
27
27
use crate :: utils:: channel:: { self , Info } ;
28
- use crate :: utils:: exec:: BootstrapCommand ;
28
+ use crate :: utils:: exec:: { command , BootstrapCommand } ;
29
29
use crate :: utils:: helpers:: {
30
30
exe, is_dylib, move_file, t, target_supports_cranelift_backend, timeit,
31
31
} ;
@@ -180,7 +180,7 @@ fn make_win_dist(
180
180
}
181
181
182
182
//Ask gcc where it keeps its stuff
183
- let mut cmd = BootstrapCommand :: new ( builder. cc ( target) ) ;
183
+ let mut cmd = command ( builder. cc ( target) ) ;
184
184
cmd. arg ( "-print-search-dirs" ) ;
185
185
let gcc_out = cmd. capture_stdout ( ) . run ( builder) . stdout ( ) ;
186
186
@@ -1023,7 +1023,7 @@ impl Step for PlainSourceTarball {
1023
1023
}
1024
1024
1025
1025
// Vendor all Cargo dependencies
1026
- let mut cmd = BootstrapCommand :: new ( & builder. initial_cargo ) ;
1026
+ let mut cmd = command ( & builder. initial_cargo ) ;
1027
1027
cmd. arg ( "vendor" )
1028
1028
. arg ( "--versioned-dirs" )
1029
1029
. arg ( "--sync" )
@@ -1599,7 +1599,7 @@ impl Step for Extended {
1599
1599
let _ = fs:: remove_dir_all ( & pkg) ;
1600
1600
1601
1601
let pkgbuild = |component : & str | {
1602
- let mut cmd = BootstrapCommand :: new ( "pkgbuild" ) ;
1602
+ let mut cmd = command ( "pkgbuild" ) ;
1603
1603
cmd. arg ( "--identifier" )
1604
1604
. arg ( format ! ( "org.rust-lang.{}" , component) )
1605
1605
. arg ( "--scripts" )
@@ -1636,7 +1636,7 @@ impl Step for Extended {
1636
1636
builder. create_dir ( & pkg. join ( "res" ) ) ;
1637
1637
builder. create ( & pkg. join ( "res/LICENSE.txt" ) , & license) ;
1638
1638
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" ) ;
1640
1640
cmd. arg ( "--distribution" )
1641
1641
. arg ( xform ( & etc. join ( "pkg/Distribution.xml" ) ) )
1642
1642
. arg ( "--resources" )
@@ -1703,7 +1703,7 @@ impl Step for Extended {
1703
1703
let light = wix. join ( "bin/light.exe" ) ;
1704
1704
1705
1705
let heat_flags = [ "-nologo" , "-gg" , "-sfrag" , "-srd" , "-sreg" ] ;
1706
- BootstrapCommand :: new ( & heat)
1706
+ command ( & heat)
1707
1707
. current_dir ( & exe)
1708
1708
. arg ( "dir" )
1709
1709
. arg ( "rustc" )
@@ -1718,7 +1718,7 @@ impl Step for Extended {
1718
1718
. arg ( exe. join ( "RustcGroup.wxs" ) )
1719
1719
. run ( builder) ;
1720
1720
if built_tools. contains ( "rust-docs" ) {
1721
- BootstrapCommand :: new ( & heat)
1721
+ command ( & heat)
1722
1722
. current_dir ( & exe)
1723
1723
. arg ( "dir" )
1724
1724
. arg ( "rust-docs" )
@@ -1735,7 +1735,7 @@ impl Step for Extended {
1735
1735
. arg ( etc. join ( "msi/squash-components.xsl" ) )
1736
1736
. run ( builder) ;
1737
1737
}
1738
- BootstrapCommand :: new ( & heat)
1738
+ command ( & heat)
1739
1739
. current_dir ( & exe)
1740
1740
. arg ( "dir" )
1741
1741
. arg ( "cargo" )
@@ -1751,7 +1751,7 @@ impl Step for Extended {
1751
1751
. arg ( "-t" )
1752
1752
. arg ( etc. join ( "msi/remove-duplicates.xsl" ) )
1753
1753
. run ( builder) ;
1754
- BootstrapCommand :: new ( & heat)
1754
+ command ( & heat)
1755
1755
. current_dir ( & exe)
1756
1756
. arg ( "dir" )
1757
1757
. arg ( "rust-std" )
@@ -1766,7 +1766,7 @@ impl Step for Extended {
1766
1766
. arg ( exe. join ( "StdGroup.wxs" ) )
1767
1767
. run ( builder) ;
1768
1768
if built_tools. contains ( "rust-analyzer" ) {
1769
- BootstrapCommand :: new ( & heat)
1769
+ command ( & heat)
1770
1770
. current_dir ( & exe)
1771
1771
. arg ( "dir" )
1772
1772
. arg ( "rust-analyzer" )
@@ -1784,7 +1784,7 @@ impl Step for Extended {
1784
1784
. run ( builder) ;
1785
1785
}
1786
1786
if built_tools. contains ( "clippy" ) {
1787
- BootstrapCommand :: new ( & heat)
1787
+ command ( & heat)
1788
1788
. current_dir ( & exe)
1789
1789
. arg ( "dir" )
1790
1790
. arg ( "clippy" )
@@ -1802,7 +1802,7 @@ impl Step for Extended {
1802
1802
. run ( builder) ;
1803
1803
}
1804
1804
if built_tools. contains ( "miri" ) {
1805
- BootstrapCommand :: new ( & heat)
1805
+ command ( & heat)
1806
1806
. current_dir ( & exe)
1807
1807
. arg ( "dir" )
1808
1808
. arg ( "miri" )
@@ -1819,7 +1819,7 @@ impl Step for Extended {
1819
1819
. arg ( etc. join ( "msi/remove-duplicates.xsl" ) )
1820
1820
. run ( builder) ;
1821
1821
}
1822
- BootstrapCommand :: new ( & heat)
1822
+ command ( & heat)
1823
1823
. current_dir ( & exe)
1824
1824
. arg ( "dir" )
1825
1825
. arg ( "rust-analysis" )
@@ -1836,7 +1836,7 @@ impl Step for Extended {
1836
1836
. arg ( etc. join ( "msi/remove-duplicates.xsl" ) )
1837
1837
. run ( builder) ;
1838
1838
if target. ends_with ( "windows-gnu" ) {
1839
- BootstrapCommand :: new ( & heat)
1839
+ command ( & heat)
1840
1840
. current_dir ( & exe)
1841
1841
. arg ( "dir" )
1842
1842
. arg ( "rust-mingw" )
@@ -1855,7 +1855,7 @@ impl Step for Extended {
1855
1855
let candle = |input : & Path | {
1856
1856
let output = exe. join ( input. file_stem ( ) . unwrap ( ) ) . with_extension ( "wixobj" ) ;
1857
1857
let arch = if target. contains ( "x86_64" ) { "x64" } else { "x86" } ;
1858
- let mut cmd = BootstrapCommand :: new ( & candle) ;
1858
+ let mut cmd = command ( & candle) ;
1859
1859
cmd. current_dir ( & exe)
1860
1860
. arg ( "-nologo" )
1861
1861
. arg ( "-dRustcDir=rustc" )
@@ -1916,7 +1916,7 @@ impl Step for Extended {
1916
1916
1917
1917
builder. info ( & format ! ( "building `msi` installer with {light:?}" ) ) ;
1918
1918
let filename = format ! ( "{}-{}.msi" , pkgname( builder, "rust" ) , target. triple) ;
1919
- let mut cmd = BootstrapCommand :: new ( & light) ;
1919
+ let mut cmd = command ( & light) ;
1920
1920
cmd. arg ( "-nologo" )
1921
1921
. arg ( "-ext" )
1922
1922
. arg ( "WixUIExtension" )
@@ -2069,7 +2069,7 @@ fn maybe_install_llvm(
2069
2069
} else if let llvm:: LlvmBuildStatus :: AlreadyBuilt ( llvm:: LlvmResult { llvm_config, .. } ) =
2070
2070
llvm:: prebuilt_llvm_config ( builder, target)
2071
2071
{
2072
- let mut cmd = BootstrapCommand :: new ( llvm_config) ;
2072
+ let mut cmd = command ( llvm_config) ;
2073
2073
cmd. arg ( "--libfiles" ) ;
2074
2074
builder. verbose ( || println ! ( "running {cmd:?}" ) ) ;
2075
2075
let files = if builder. config . dry_run ( ) {
0 commit comments