Merge pull request #1523 from rust-lang/update_abi_cafe

Update abi-cafe
This commit is contained in:
bjorn3 2024-08-02 20:20:05 +02:00 committed by GitHub
commit 395181c9bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 65 additions and 45 deletions

View File

@ -8,7 +8,7 @@ permissions: {}
jobs:
abi_cafe:
runs-on: ${{ matrix.os }}
timeout-minutes: 60
timeout-minutes: 30
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}-${{ matrix.env.TARGET_TRIPLE }}
cancel-in-progress: true
@ -30,9 +30,10 @@ jobs:
- os: windows-latest
env:
TARGET_TRIPLE: x86_64-pc-windows-msvc
- os: windows-latest
env:
TARGET_TRIPLE: x86_64-pc-windows-gnu
# FIXME Currently hangs. Re-enable once this is fixed or abi-cafe adds a timeout.
#- os: windows-latest
# env:
# TARGET_TRIPLE: x86_64-pc-windows-gnu
steps:
- uses: actions/checkout@v4

View File

@ -6,8 +6,8 @@
static ABI_CAFE_REPO: GitRepo = GitRepo::github(
"Gankra",
"abi-cafe",
"4c6dc8c9c687e2b3a760ff2176ce236872b37212",
"588df6d66abbe105",
"f1220cfd13b57f5c0082c26529163865ee25e115",
"fe93a9acd461425d",
"abi-cafe",
);
@ -38,17 +38,23 @@ pub(crate) fn run(
eprintln!("Running abi-cafe");
let pairs = ["rustc_calls_cgclif", "cgclif_calls_rustc", "cgclif_calls_cc", "cc_calls_cgclif"];
let mut cmd = ABI_CAFE.run(bootstrap_host_compiler, dirs);
cmd.arg("--");
cmd.arg("--pairs");
cmd.args(
let pairs =
if cfg!(not(any(target_os = "macos", all(target_os = "windows", target_env = "msvc")))) {
&pairs[..]
} else {
&pairs[..2]
},
);
};
let mut cmd = ABI_CAFE.run(bootstrap_host_compiler, dirs);
cmd.arg("--");
// stdcall, vectorcall and such don't work yet
cmd.arg("--conventions").arg("c").arg("--conventions").arg("rust");
for pair in pairs {
cmd.arg("--pairs").arg(pair);
}
cmd.arg("--add-rustc-codegen-backend");
match cg_clif_dylib {
CodegenBackend::Local(path) => {
@ -58,6 +64,7 @@ pub(crate) fn run(
cmd.arg(format!("cgclif:{name}"));
}
}
cmd.current_dir(ABI_CAFE.source_dir(dirs));
spawn_and_wait(cmd);

View File

@ -1,32 +0,0 @@
From 2b15fee2bb5fd14e34c7e17e44d99cb34f4c555d Mon Sep 17 00:00:00 2001
From: Afonso Bordado <afonsobordado@az8.co>
Date: Tue, 27 Sep 2022 07:55:17 +0100
Subject: [PATCH] Disable some test on x86_64-pc-windows-gnu
---
src/report.rs | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/report.rs b/src/report.rs
index eeec614..f582867 100644
--- a/src/report.rs
+++ b/src/report.rs
@@ -48,6 +48,15 @@ pub fn get_test_rules(test: &TestKey, caller: &dyn AbiImpl, callee: &dyn AbiImpl
//
// THIS AREA RESERVED FOR VENDORS TO APPLY PATCHES
+ // x86_64-pc-windows-gnu has some broken i128 tests that aren't disabled by default
+ if cfg!(all(target_os = "windows", target_env = "gnu")) && test.test_name == "ui128" {
+ result.run = Link;
+ result.check = Pass(Link);
+ } else if test.test_name == "ui128" {
+ result.run == Check;
+ result.check = Pass(Check);
+ }
+
// END OF VENDOR RESERVED AREA
//
//
--
2.30.1.windows.1

View File

@ -0,0 +1,44 @@
From 378d9e451a8af1045b8cb32841198cd5ad5464a3 Mon Sep 17 00:00:00 2001
From: bjorn3 <17426603+bjorn3@users.noreply.github.com>
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(-)
diff --git a/src/report.rs b/src/report.rs
index acfce38..b3ab842 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
//
// 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!(target_arch = "aarch64") && test.test == "OptionU128" && 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 {
+ result.check = Busted(Run);
+ }
+
+ if cfg!(windows) && (test.test == "OptionU128" || test.test == "I64Array" || test.test == "simple") {
+ result.run = Skip; // Gives SIGILL on x86_64 windows.
+ }
+
+ if test.test == "f16" || test.test == "f128" {
+ result.run = Skip;
+ }
+
// END OF VENDOR RESERVED AREA
//
//
--
2.34.1