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() {
8383 args. remove ( 0 )
8484 }
8585 } 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+ }
8791 rustc_real
8892 } ;
8993
Original file line number Diff line number Diff line change @@ -1643,6 +1643,8 @@ impl<'a> Builder<'a> {
16431643 // NOTE: we intentionally use RUSTC_WRAPPER so that we can support clippy - RUSTC is not
16441644 // respected by clippy-driver; RUSTC_WRAPPER happens earlier, before clippy runs.
16451645 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" ) ) ;
16461648
16471649 // Someone might have set some previous rustc wrapper (e.g.
16481650 // sccache) before bootstrap overrode it. Respect that variable.
You can’t perform that action at this time.
0 commit comments