File tree 1 file changed +2
-7
lines changed
src/bootstrap/src/core/config
1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -1451,11 +1451,6 @@ impl Config {
1451
1451
config. out = crate :: utils:: helpers:: absolute ( & config. out ) ;
1452
1452
}
1453
1453
1454
- // Hacky way to determine the executable suffix for the build target. We cannot use
1455
- // std::env::consts::EXE_SUFFIX as the build target might not be the target bootstrap was
1456
- // compiled with.
1457
- let initial_exe_suffix = if config. build . triple . contains ( "windows" ) { ".exe" } else { "" } ;
1458
-
1459
1454
config. initial_rustc = if let Some ( rustc) = rustc {
1460
1455
if !flags. skip_stage0_validation {
1461
1456
config. check_stage0_version ( & rustc, "rustc" ) ;
@@ -1468,7 +1463,7 @@ impl Config {
1468
1463
. join ( config. build . triple )
1469
1464
. join ( "stage0" )
1470
1465
. join ( "bin" )
1471
- . join ( format ! ( "rustc{initial_exe_suffix}" ) )
1466
+ . join ( exe ( "rustc" , config . build ) )
1472
1467
} ;
1473
1468
1474
1469
config. initial_cargo = if let Some ( cargo) = cargo {
@@ -1483,7 +1478,7 @@ impl Config {
1483
1478
. join ( config. build . triple )
1484
1479
. join ( "stage0" )
1485
1480
. join ( "bin" )
1486
- . join ( format ! ( "cargo{initial_exe_suffix}" ) )
1481
+ . join ( exe ( "cargo" , config . build ) )
1487
1482
} ;
1488
1483
1489
1484
// NOTE: it's important this comes *after* we set `initial_rustc` just above.
You can’t perform that action at this time.
0 commit comments