File tree 1 file changed +9
-3
lines changed
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -1271,9 +1271,15 @@ impl<'a> Builder<'a> {
1271
1271
let mut cmd = Command :: new ( cargo_miri) ;
1272
1272
cmd. env ( "MIRI" , & miri) ;
1273
1273
cmd. env ( "CARGO" , & self . initial_cargo ) ;
1274
- // Need to add the run_compiler libs. Not entirely sure why that has to be one stage up from
1275
- // what Miri was built for.
1276
- self . add_rustc_lib_path ( run_compiler, & mut cmd) ;
1274
+ // Need to add the `run_compiler` libs. Those are the libs produces *by* `build_compiler`,
1275
+ // so they match the Miri we just built. However this means they are actually living one
1276
+ // stage up, i.e. we are running `stage0-tools-bin/miri` with the libraries in `stage1/lib`.
1277
+ // This is an unfortunate off-by-1 caused (possibly) by the fact that Miri doesn't have an
1278
+ // "assemble" step like rustc does that would cross the stage boundary. We can't use
1279
+ // `add_rustc_lib_path` as that's a NOP on Windows but we do need these libraries added to
1280
+ // the PATH due to the stage mismatch.
1281
+ // Also see https://github.com/rust-lang/rust/pull/123192#issuecomment-2028901503.
1282
+ add_dylib_path ( self . rustc_lib_paths ( run_compiler) , & mut cmd) ;
1277
1283
cmd
1278
1284
}
1279
1285
You can’t perform that action at this time.
0 commit comments