Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 3936134

Browse files
committed
Fix some cross compilation scenarios in test runner
1 parent f8747f0 commit 3936134

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

build_system/build_sysroot.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub(crate) fn build_sysroot(
2323
fs::create_dir_all(target_dir.join("lib")).unwrap();
2424

2525
// Copy the backend
26-
let cg_clif_dylib = get_file_name("rustc_codegen_cranelift", "dylib", target_triple);
26+
let cg_clif_dylib = get_file_name("rustc_codegen_cranelift", "dylib", host_triple);
2727
let cg_clif_dylib_path = target_dir
2828
.join(if cfg!(windows) {
2929
// Windows doesn't have rpath support, so the cg_clif dylib needs to be next to the
@@ -37,7 +37,7 @@ pub(crate) fn build_sysroot(
3737

3838
// Build and copy rustc and cargo wrappers
3939
for wrapper in ["rustc-clif", "cargo-clif"] {
40-
let wrapper_name = get_wrapper_file_name(wrapper, "bin", target_triple);
40+
let wrapper_name = get_wrapper_file_name(wrapper, "bin", host_triple);
4141

4242
let mut build_cargo_wrapper_cmd = Command::new("rustc");
4343
build_cargo_wrapper_cmd

build_system/tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ impl TestRunner {
414414
{
415415
let mut rustc_clif = self.root_dir.clone();
416416
rustc_clif.push("build");
417-
rustc_clif.push(get_wrapper_file_name("rustc-clif", "bin", &self.target_triple));
417+
rustc_clif.push(get_wrapper_file_name("rustc-clif", "bin", &self.host_triple));
418418

419419
let mut cmd = Command::new(rustc_clif);
420420
if !self.rust_flags.is_empty() {
@@ -476,7 +476,7 @@ impl TestRunner {
476476
{
477477
let mut cargo_clif = self.root_dir.clone();
478478
cargo_clif.push("build");
479-
cargo_clif.push(get_wrapper_file_name("cargo-clif", "bin", &self.target_triple));
479+
cargo_clif.push(get_wrapper_file_name("cargo-clif", "bin", &self.host_triple));
480480

481481
let mut cmd = Command::new(cargo_clif);
482482
cmd.args(args);

0 commit comments

Comments
 (0)