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