File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,11 @@ fn main() {
83
83
args. remove ( 0 )
84
84
}
85
85
} else {
86
- args. remove ( 0 ) ;
86
+ // Cargo doesn't respect RUSTC_WRAPPER for version information >:(
87
+ // don't remove the first arg if we're being run as RUSTC instead of RUSTC_WRAPPER.
88
+ if args[ 0 ] == env:: current_exe ( ) . expect ( "couldn't get path to rustc shim" ) {
89
+ args. remove ( 0 ) ;
90
+ }
87
91
rustc_real
88
92
} ;
89
93
Original file line number Diff line number Diff line change @@ -1643,6 +1643,8 @@ impl<'a> Builder<'a> {
1643
1643
// NOTE: we intentionally use RUSTC_WRAPPER so that we can support clippy - RUSTC is not
1644
1644
// respected by clippy-driver; RUSTC_WRAPPER happens earlier, before clippy runs.
1645
1645
cargo. env ( "RUSTC_WRAPPER" , self . bootstrap_out . join ( "rustc" ) ) ;
1646
+ // NOTE: we also need to set RUSTC so cargo can run `rustc -vV`; apparently that ignores RUSTC_WRAPPER >:(
1647
+ cargo. env ( "RUSTC" , self . bootstrap_out . join ( "rustc" ) ) ;
1646
1648
1647
1649
// Someone might have set some previous rustc wrapper (e.g.
1648
1650
// sccache) before bootstrap overrode it. Respect that variable.
You can’t perform that action at this time.
0 commit comments