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 @@ -81,7 +81,11 @@ fn main() {
8181 args. remove ( 0 )
8282 }
8383 } 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+ }
8589 rustc_real
8690 } ;
8791
Original file line number Diff line number Diff line change @@ -1662,6 +1662,8 @@ impl<'a> Builder<'a> {
16621662 // NOTE: we intentionally use RUSTC_WRAPPER so that we can support clippy - RUSTC is not
16631663 // respected by clippy-driver; RUSTC_WRAPPER happens earlier, before clippy runs.
16641664 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" ) ) ;
16651667
16661668 // Someone might have set some previous rustc wrapper (e.g.
16671669 // sccache) before bootstrap overrode it. Respect that variable.
You can’t perform that action at this time.
0 commit comments