Skip to content

Commit 05be24c

Browse files
committed
let tool::Miri implementation to handle compilers
Signed-off-by: onur-ozkan <work@onurozkan.dev>
1 parent 7e432c4 commit 05be24c

File tree

1 file changed

+5
-5
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,19 +124,19 @@ impl Step for Miri {
124124
std::process::exit(1);
125125
}
126126

127-
// This compiler runs on the host, we'll just use it for the target.
128-
let target_compiler = builder.compiler(stage, host);
129-
let host_compiler = tool::get_tool_rustc_compiler(builder, target_compiler);
127+
let compiler = builder.compiler(stage, target);
128+
let miri_build = builder.ensure(tool::Miri { compiler, target });
130129

131130
// Get a target sysroot for Miri.
132-
let miri_sysroot = test::Miri::build_miri_sysroot(builder, target_compiler, target);
131+
let miri_sysroot =
132+
test::Miri::build_miri_sysroot(builder, miri_build.target_compiler, target);
133133

134134
// # Run miri.
135135
// Running it via `cargo run` as that figures out the right dylib path.
136136
// add_rustc_lib_path does not add the path that contains librustc_driver-<...>.so.
137137
let mut miri = tool::prepare_tool_cargo(
138138
builder,
139-
host_compiler,
139+
miri_build.build_compiler,
140140
Mode::ToolRustc,
141141
host,
142142
Kind::Run,

0 commit comments

Comments
 (0)