Skip to content

Commit 747adbd

Browse files
authored
Merge pull request #1515 from lqd/abi-cafe
enable abi-cafe tests on `aarch64-apple-darwin`
2 parents 395181c + 1f19cdf commit 747adbd

File tree

3 files changed

+30
-11
lines changed

3 files changed

+30
-11
lines changed

.github/workflows/abi-cafe.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ jobs:
2727
- os: macos-latest
2828
env:
2929
TARGET_TRIPLE: x86_64-apple-darwin
30+
- os: macos-latest
31+
env:
32+
TARGET_TRIPLE: aarch64-apple-darwin
3033
- os: windows-latest
3134
env:
3235
TARGET_TRIPLE: x86_64-pc-windows-msvc

build_system/abi_cafe.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::path::Dirs;
1+
use crate::path::{Dirs, RelPath};
22
use crate::prepare::GitRepo;
33
use crate::utils::{spawn_and_wait, CargoProject, Compiler};
44
use crate::{build_sysroot, CodegenBackend, SysrootKind};
@@ -21,6 +21,7 @@ pub(crate) fn run(
2121
rustup_toolchain_name: Option<&str>,
2222
bootstrap_host_compiler: &Compiler,
2323
) {
24+
RelPath::DOWNLOAD.ensure_exists(dirs);
2425
ABI_CAFE_REPO.fetch(dirs);
2526
ABI_CAFE_REPO.patch(dirs);
2627

patches/0002-abi-cafe-Disable-broken-tests.patch

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,42 @@
1-
From 378d9e451a8af1045b8cb32841198cd5ad5464a3 Mon Sep 17 00:00:00 2001
1+
From 236df390f3bc4ed69c26f4d51d584bea246da886 Mon Sep 17 00:00:00 2001
22
From: bjorn3 <[email protected]>
33
Date: Tue, 9 Jul 2024 11:25:14 +0000
44
Subject: [PATCH] Disable broken tests
55

66
---
7-
src/abis/mod.rs | 6 +++---
8-
src/report.rs | 4 ++++
9-
2 files changed, 7 insertions(+), 3 deletions(-)
7+
src/report.rs | 36 ++++++++++++++++++++++++++++++++++++
8+
1 file changed, 36 insertions(+)
109

1110
diff --git a/src/report.rs b/src/report.rs
12-
index acfce38..b3ab842 100644
11+
index 958ab43..dcf1044 100644
1312
--- a/src/report.rs
1413
+++ b/src/report.rs
15-
@@ -45,6 +45,26 @@ pub fn get_test_rules(test: &TestKey, caller: &dyn AbiImpl, callee: &dyn AbiImpl
14+
@@ -48,6 +48,42 @@ pub fn get_test_rules(test: &TestKey, caller: &dyn Toolchain, callee: &dyn Toolc
1615
//
1716
// THIS AREA RESERVED FOR VENDORS TO APPLY PATCHES
1817

19-
+ if cfg!(target_arch = "aarch64") && test.test == "F32Array" && test.options.convention == CallingConvention::C {
20-
+ result.check = Busted(Check);
18+
+ if cfg!(all(target_arch = "aarch64", target_os = "linux")) {
19+
+ if test.test == "F32Array" && test.options.convention == CallingConvention::C {
20+
+ result.check = Busted(Check);
21+
+ }
22+
+
23+
+ if test.test == "OptionU128" && test.options.convention == CallingConvention::Rust && test.options.repr == LangRepr::C {
24+
+ result.check = Busted(Check);
25+
+ }
2126
+ }
2227
+
23-
+ if cfg!(target_arch = "aarch64") && test.test == "OptionU128" && test.options.convention == CallingConvention::Rust && test.options.repr == LangRepr::C {
24-
+ result.check = Busted(Check);
28+
+ if cfg!(all(target_arch = "aarch64", target_os = "macos")) {
29+
+ if test.test == "SingleVariantUnion" && test.options.convention == CallingConvention::C && test.options.repr == LangRepr::C {
30+
+ result.check = Busted(Check);
31+
+ }
32+
+
33+
+ if test.test == "OptionU128" && test.caller == "rustc" && test.options.convention == CallingConvention::Rust && test.options.repr == LangRepr::C {
34+
+ result.check = Busted(Run);
35+
+ }
36+
+
37+
+ if test.test == "OptionU128" && test.caller == "cgclif" && test.options.convention == CallingConvention::Rust && test.options.repr == LangRepr::C {
38+
+ result.check = Busted(Check);
39+
+ }
2540
+ }
2641
+
2742
+ if cfg!(target_arch = "x86_64") && test.test == "OptionU128" && test.options.convention == CallingConvention::Rust && test.options.repr == LangRepr::Rust {

0 commit comments

Comments
 (0)