@@ -37,31 +37,26 @@ pub(crate) fn run(
37
37
let cg_clif_dylib_path = build_dir. join ( if cfg ! ( windows) { "bin" } else { "lib" } ) . join (
38
38
env:: consts:: DLL_PREFIX . to_string ( ) + "rustc_codegen_cranelift" + env:: consts:: DLL_SUFFIX ,
39
39
) ;
40
- println ! ( "cg_clif_dylib_path: {}" , cg_clif_dylib_path. display( ) ) ;
41
40
42
41
let pairs = [ "rustc_calls_cgclif" , "cgclif_calls_rustc" , "cgclif_calls_cc" , "cc_calls_cgclif" ] ;
43
42
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!" ) ;
66
61
}
67
62
}
0 commit comments