Skip to content

Commit ae79f32

Browse files
committed
let tool::Miri implementation to handle compilers
Signed-off-by: onur-ozkan <work@onurozkan.dev>
1 parent 55298ea commit ae79f32

File tree

1 file changed

+4
-3
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+4
-3
lines changed

src/bootstrap/src/core/build_steps/run.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,10 @@ impl Step for Miri {
132132
std::process::exit(1);
133133
}
134134

135-
// This compiler runs on the host, we'll just use it for the target.
136-
let target_compiler = builder.compiler(stage, host);
137-
let host_compiler = tool::get_tool_rustc_compiler(builder, target_compiler);
135+
let target_compiler = builder.compiler(stage, target);
136+
let miri_build = builder.ensure(tool::Miri { compiler: target_compiler, target });
137+
// Rustc tools are off by one stage, so use the build compiler to run miri.
138+
let host_compiler = miri_build.build_compiler;
138139

139140
// Get a target sysroot for Miri.
140141
let miri_sysroot = test::Miri::build_miri_sysroot(builder, target_compiler, target);

0 commit comments

Comments
 (0)