Skip to content

Commit 395181c

Browse files
authored
Merge pull request rust-lang#1523 from rust-lang/update_abi_cafe
Update abi-cafe
2 parents c48b010 + e52af66 commit 395181c

File tree

4 files changed

+65
-45
lines changed

4 files changed

+65
-45
lines changed

.github/workflows/abi-cafe.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ permissions: {}
88
jobs:
99
abi_cafe:
1010
runs-on: ${{ matrix.os }}
11-
timeout-minutes: 60
11+
timeout-minutes: 30
1212
concurrency:
1313
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}-${{ matrix.env.TARGET_TRIPLE }}
1414
cancel-in-progress: true
@@ -30,9 +30,10 @@ jobs:
3030
- os: windows-latest
3131
env:
3232
TARGET_TRIPLE: x86_64-pc-windows-msvc
33-
- os: windows-latest
34-
env:
35-
TARGET_TRIPLE: x86_64-pc-windows-gnu
33+
# FIXME Currently hangs. Re-enable once this is fixed or abi-cafe adds a timeout.
34+
#- os: windows-latest
35+
# env:
36+
# TARGET_TRIPLE: x86_64-pc-windows-gnu
3637

3738
steps:
3839
- uses: actions/checkout@v4

build_system/abi_cafe.rs

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ use crate::{build_sysroot, CodegenBackend, SysrootKind};
66
static ABI_CAFE_REPO: GitRepo = GitRepo::github(
77
"Gankra",
88
"abi-cafe",
9-
"4c6dc8c9c687e2b3a760ff2176ce236872b37212",
10-
"588df6d66abbe105",
9+
"f1220cfd13b57f5c0082c26529163865ee25e115",
10+
"fe93a9acd461425d",
1111
"abi-cafe",
1212
);
1313

@@ -38,17 +38,23 @@ pub(crate) fn run(
3838
eprintln!("Running abi-cafe");
3939

4040
let pairs = ["rustc_calls_cgclif", "cgclif_calls_rustc", "cgclif_calls_cc", "cc_calls_cgclif"];
41-
42-
let mut cmd = ABI_CAFE.run(bootstrap_host_compiler, dirs);
43-
cmd.arg("--");
44-
cmd.arg("--pairs");
45-
cmd.args(
41+
let pairs =
4642
if cfg!(not(any(target_os = "macos", all(target_os = "windows", target_env = "msvc")))) {
4743
&pairs[..]
4844
} else {
4945
&pairs[..2]
50-
},
51-
);
46+
};
47+
48+
let mut cmd = ABI_CAFE.run(bootstrap_host_compiler, dirs);
49+
cmd.arg("--");
50+
51+
// stdcall, vectorcall and such don't work yet
52+
cmd.arg("--conventions").arg("c").arg("--conventions").arg("rust");
53+
54+
for pair in pairs {
55+
cmd.arg("--pairs").arg(pair);
56+
}
57+
5258
cmd.arg("--add-rustc-codegen-backend");
5359
match cg_clif_dylib {
5460
CodegenBackend::Local(path) => {
@@ -58,6 +64,7 @@ pub(crate) fn run(
5864
cmd.arg(format!("cgclif:{name}"));
5965
}
6066
}
67+
6168
cmd.current_dir(ABI_CAFE.source_dir(dirs));
6269

6370
spawn_and_wait(cmd);

patches/0001-abi-cafe-Disable-some-test-on-x86_64-pc-windows-gnu.patch

Lines changed: 0 additions & 32 deletions
This file was deleted.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
From 378d9e451a8af1045b8cb32841198cd5ad5464a3 Mon Sep 17 00:00:00 2001
2+
From: bjorn3 <[email protected]>
3+
Date: Tue, 9 Jul 2024 11:25:14 +0000
4+
Subject: [PATCH] Disable broken tests
5+
6+
---
7+
src/abis/mod.rs | 6 +++---
8+
src/report.rs | 4 ++++
9+
2 files changed, 7 insertions(+), 3 deletions(-)
10+
11+
diff --git a/src/report.rs b/src/report.rs
12+
index acfce38..b3ab842 100644
13+
--- a/src/report.rs
14+
+++ b/src/report.rs
15+
@@ -45,6 +45,26 @@ pub fn get_test_rules(test: &TestKey, caller: &dyn AbiImpl, callee: &dyn AbiImpl
16+
//
17+
// THIS AREA RESERVED FOR VENDORS TO APPLY PATCHES
18+
19+
+ if cfg!(target_arch = "aarch64") && test.test == "F32Array" && test.options.convention == CallingConvention::C {
20+
+ result.check = Busted(Check);
21+
+ }
22+
+
23+
+ if cfg!(target_arch = "aarch64") && test.test == "OptionU128" && test.options.convention == CallingConvention::Rust && test.options.repr == LangRepr::C {
24+
+ result.check = Busted(Check);
25+
+ }
26+
+
27+
+ if cfg!(target_arch = "x86_64") && test.test == "OptionU128" && test.options.convention == CallingConvention::Rust && test.options.repr == LangRepr::Rust {
28+
+ result.check = Busted(Run);
29+
+ }
30+
+
31+
+ if cfg!(windows) && (test.test == "OptionU128" || test.test == "I64Array" || test.test == "simple") {
32+
+ result.run = Skip; // Gives SIGILL on x86_64 windows.
33+
+ }
34+
+
35+
+ if test.test == "f16" || test.test == "f128" {
36+
+ result.run = Skip;
37+
+ }
38+
+
39+
// END OF VENDOR RESERVED AREA
40+
//
41+
//
42+
--
43+
2.34.1
44+

0 commit comments

Comments
 (0)