File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -815,7 +815,7 @@ impl<'a> Builder<'a> {
815
815
stage = compiler. stage ;
816
816
}
817
817
818
- let mut rustflags = Rustflags :: new ( & target, & mut cargo ) ;
818
+ let mut rustflags = Rustflags :: new ( & target) ;
819
819
if stage != 0 {
820
820
rustflags. env ( "RUSTFLAGS_NOT_BOOTSTRAP" ) ;
821
821
} else {
@@ -1339,18 +1339,16 @@ mod tests;
1339
1339
struct Rustflags ( String ) ;
1340
1340
1341
1341
impl Rustflags {
1342
- fn new ( target : & str , cmd : & mut Command ) -> Rustflags {
1342
+ fn new ( target : & str ) -> Rustflags {
1343
1343
let mut ret = Rustflags ( String :: new ( ) ) ;
1344
1344
1345
1345
// Inherit `RUSTFLAGS` by default ...
1346
1346
ret. env ( "RUSTFLAGS" ) ;
1347
1347
1348
1348
// ... and also handle target-specific env RUSTFLAGS if they're
1349
- // configured. If this is configured we also remove it from the
1350
- // environment because Cargo will prefer it over RUSTFLAGS.
1349
+ // configured.
1351
1350
let target_specific = format ! ( "CARGO_TARGET_{}_RUSTFLAGS" , crate :: envify( target) ) ;
1352
1351
ret. env ( & target_specific) ;
1353
- cmd. env_remove ( & target_specific) ;
1354
1352
1355
1353
ret
1356
1354
}
You can’t perform that action at this time.
0 commit comments