File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -671,7 +671,10 @@ fn phase_cargo_miri(mut args: env::Args) {
671
671
// (https://github.com/rust-lang/cargo/issues/10885). There is no good way to single out these invocations;
672
672
// some build scripts use the RUSTC env var as well. So we set it directly to the `miri` driver and
673
673
// hope that all they do is ask for the version number -- things could quickly go downhill from here.
674
- cmd. env ( "RUSTC" , & find_miri ( ) ) ;
674
+ // In `main`, we need the value of `RUSTC` to distinguish RUSTC_WRAPPER invocations from rustdoc
675
+ // or TARGET_RUNNER invocations, so we canonicalize it here to make it exceedingly unlikely that
676
+ // there would be a collision.
677
+ cmd. env ( "RUSTC" , & fs:: canonicalize ( find_miri ( ) ) . unwrap ( ) ) ;
675
678
676
679
let runner_env_name =
677
680
|triple : & str | format ! ( "CARGO_TARGET_{}_RUNNER" , triple. to_uppercase( ) . replace( '-' , "_" ) ) ;
You can’t perform that action at this time.
0 commit comments