Skip to content

Commit e5ba71a

Browse files
committed
Pass all pairs to abi-checker
1 parent 5693122 commit e5ba71a

File tree

1 file changed

+18
-23
lines changed

1 file changed

+18
-23
lines changed

build_system/abi_checker.rs

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -37,31 +37,26 @@ pub(crate) fn run(
3737
let cg_clif_dylib_path = build_dir.join(if cfg!(windows) { "bin" } else { "lib" }).join(
3838
env::consts::DLL_PREFIX.to_string() + "rustc_codegen_cranelift" + env::consts::DLL_SUFFIX,
3939
);
40-
println!("cg_clif_dylib_path: {}", cg_clif_dylib_path.display());
4140

4241
let pairs = ["rustc_calls_cgclif", "cgclif_calls_rustc", "cgclif_calls_cc", "cc_calls_cgclif"];
4342

44-
for pair in pairs {
45-
eprintln!("[ABI-CHECKER] Running pair {pair}");
46-
47-
let mut cmd = Command::new("cargo");
48-
cmd.arg("run");
49-
cmd.arg("--target");
50-
cmd.arg(target_triple);
51-
cmd.arg("--");
52-
cmd.arg("--pairs");
53-
cmd.arg(pair);
54-
cmd.arg("--add-rustc-codegen-backend");
55-
cmd.arg(format!("cgclif:{}", cg_clif_dylib_path.display()));
56-
57-
let output = spawn_and_wait_with_input(cmd, "".to_string());
58-
59-
// TODO: The correct thing to do here is to check the exit code, but abi-checker
60-
// currently doesn't return 0 on success, so check for the test fail count.
61-
// See: https://github.com/Gankra/abi-checker/issues/10
62-
let failed = !(output.contains("0 failed") && output.contains("0 completely failed"));
63-
if failed {
64-
panic!("abi-checker for pair {} failed!", pair);
65-
}
43+
let mut cmd = Command::new("cargo");
44+
cmd.arg("run");
45+
cmd.arg("--target");
46+
cmd.arg(target_triple);
47+
cmd.arg("--");
48+
cmd.arg("--pairs");
49+
cmd.args(pairs);
50+
cmd.arg("--add-rustc-codegen-backend");
51+
cmd.arg(format!("cgclif:{}", cg_clif_dylib_path.display()));
52+
53+
let output = spawn_and_wait_with_input(cmd, "".to_string());
54+
55+
// TODO: The correct thing to do here is to check the exit code, but abi-checker
56+
// currently doesn't return 0 on success, so check for the test fail count.
57+
// See: https://github.com/Gankra/abi-checker/issues/10
58+
let failed = !(output.contains("0 failed") && output.contains("0 completely failed"));
59+
if failed {
60+
panic!("abi-checker failed!");
6661
}
6762
}

0 commit comments

Comments
 (0)