Skip to content

enable abi-cafe tests on aarch64-apple-darwin #1515

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/abi-cafe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ jobs:
- os: macos-latest
env:
TARGET_TRIPLE: x86_64-apple-darwin
- os: macos-latest
env:
TARGET_TRIPLE: aarch64-apple-darwin
- os: windows-latest
env:
TARGET_TRIPLE: x86_64-pc-windows-msvc
Expand Down
3 changes: 2 additions & 1 deletion build_system/abi_cafe.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::path::Dirs;
use crate::path::{Dirs, RelPath};
use crate::prepare::GitRepo;
use crate::utils::{spawn_and_wait, CargoProject, Compiler};
use crate::{build_sysroot, CodegenBackend, SysrootKind};
Expand All @@ -21,6 +21,7 @@ pub(crate) fn run(
rustup_toolchain_name: Option<&str>,
bootstrap_host_compiler: &Compiler,
) {
RelPath::DOWNLOAD.ensure_exists(dirs);
ABI_CAFE_REPO.fetch(dirs);
ABI_CAFE_REPO.patch(dirs);

Expand Down
35 changes: 25 additions & 10 deletions patches/0002-abi-cafe-Disable-broken-tests.patch
Original file line number Diff line number Diff line change
@@ -1,27 +1,42 @@
From 378d9e451a8af1045b8cb32841198cd5ad5464a3 Mon Sep 17 00:00:00 2001
From 236df390f3bc4ed69c26f4d51d584bea246da886 Mon Sep 17 00:00:00 2001
From: bjorn3 <[email protected]>
Date: Tue, 9 Jul 2024 11:25:14 +0000
Subject: [PATCH] Disable broken tests

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

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

+ if cfg!(target_arch = "aarch64") && test.test == "F32Array" && test.options.convention == CallingConvention::C {
+ result.check = Busted(Check);
+ if cfg!(all(target_arch = "aarch64", target_os = "linux")) {
+ if test.test == "F32Array" && test.options.convention == CallingConvention::C {
+ result.check = Busted(Check);
+ }
+
+ if test.test == "OptionU128" && test.options.convention == CallingConvention::Rust && test.options.repr == LangRepr::C {
+ result.check = Busted(Check);
+ }
+ }
+
+ if cfg!(target_arch = "aarch64") && test.test == "OptionU128" && test.options.convention == CallingConvention::Rust && test.options.repr == LangRepr::C {
+ result.check = Busted(Check);
+ if cfg!(all(target_arch = "aarch64", target_os = "macos")) {
+ if test.test == "SingleVariantUnion" && test.options.convention == CallingConvention::C && test.options.repr == LangRepr::C {
+ result.check = Busted(Check);
+ }
+
+ if test.test == "OptionU128" && test.caller == "rustc" && test.options.convention == CallingConvention::Rust && test.options.repr == LangRepr::C {
+ result.check = Busted(Run);
+ }
+
+ if test.test == "OptionU128" && test.caller == "cgclif" && test.options.convention == CallingConvention::Rust && test.options.repr == LangRepr::C {
+ result.check = Busted(Check);
+ }
+ }
+
+ if cfg!(target_arch = "x86_64") && test.test == "OptionU128" && test.options.convention == CallingConvention::Rust && test.options.repr == LangRepr::Rust {
Expand Down