about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2025-06-15 12:09:50 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2025-06-15 12:15:26 +0000
commit8a396193432f4a9cb25ab76f6fdeefe08484edf8 (patch)
tree7c26a4bf1fec20e093608df48d6e739df6cc7713
parent3e59f14fb286859e01f467e17aa3fb251802e670 (diff)
downloadrust-8a396193432f4a9cb25ab76f6fdeefe08484edf8.tar.gz
rust-8a396193432f4a9cb25ab76f6fdeefe08484edf8.zip
Use the new abi-cafe-rules.toml support
-rw-r--r--build_system/abi_cafe.rs2
-rw-r--r--patches/0002-abi-cafe-Disable-broken-tests.patch69
-rw-r--r--patches/0002-abi-cafe-Enable-debuginfo.patch24
-rw-r--r--scripts/abi-cafe-rules.toml17
4 files changed, 43 insertions, 69 deletions
diff --git a/build_system/abi_cafe.rs b/build_system/abi_cafe.rs
index bee59b2b956..8f8884d2ac9 100644
--- a/build_system/abi_cafe.rs
+++ b/build_system/abi_cafe.rs
@@ -46,6 +46,8 @@ pub(crate) fn run(
     let mut cmd = ABI_CAFE.run(bootstrap_host_compiler, dirs);
     cmd.arg("--");
 
+    cmd.arg("--rules").arg(dirs.source_dir.join("scripts/abi-cafe-rules.toml"));
+
     // stdcall, vectorcall and such don't work yet
     cmd.arg("--conventions").arg("c").arg("--conventions").arg("rust");
 
diff --git a/patches/0002-abi-cafe-Disable-broken-tests.patch b/patches/0002-abi-cafe-Disable-broken-tests.patch
deleted file mode 100644
index 708bef0edcf..00000000000
--- a/patches/0002-abi-cafe-Disable-broken-tests.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From 236df390f3bc4ed69c26f4d51d584bea246da886 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/harness/report.rs | 36 ++++++++++++++++++++++++++++++++++++
- 1 file changed, 36 insertions(+)
-
-diff --git a/src/toolchains/rust.rs b/src/toolchains/rust.rs
-index 0c50f7a..bfde2b1 100644
---- a/src/toolchains/rust.rs
-+++ b/src/toolchains/rust.rs
-@@ -83,6 +83,7 @@ impl Toolchain for RustcToolchain {
-             .arg(out_dir)
-             .arg("--target")
-             .arg(&self.platform_info.target)
-+            .arg("-g")
-             .arg(format!("-Cmetadata={lib_name}"))
-             .arg(src_path);
-         if let Some(codegen_backend) = &self.codegen_backend {
-diff --git a/src/harness/report.rs b/src/harness/report.rs
-index 958ab43..dcf1044 100644
---- a/src/harness/report.rs
-+++ b/src/harness/report.rs
-@@ -48,6 +48,40 @@ pub fn get_test_rules(test: &TestKey, caller: &dyn Toolchain, callee: &dyn Toolc
-         //
-         // THIS AREA RESERVED FOR VENDORS TO APPLY PATCHES
- 
-+        if cfg!(all(target_arch = "aarch64", target_os = "linux")) {
-+            if key.test == "F32Array" && key.options.convention == CallingConvention::C {
-+                result.check = Busted(Check);
-+            }
-+        }
-+
-+        if cfg!(all(target_arch = "aarch64", target_os = "macos")) {
-+            if key.test == "SingleVariantUnion" && key.options.convention == CallingConvention::C && key.options.repr == LangRepr::C {
-+                result.check = Busted(Check);
-+            }
-+
-+            if key.test == "OptionU128" && key.caller == "rustc" && key.options.convention == CallingConvention::Rust && key.options.repr == LangRepr::C {
-+                result.check = Busted(Run);
-+            }
-+
-+            if key.test == "OptionU128" && key.caller == "cgclif" && key.options.convention == CallingConvention::Rust && key.options.repr == LangRepr::C {
-+                result.check = Busted(Check);
-+            }
-+        }
-+
-+        if cfg!(all(target_arch = "x86_64", windows)) {
-+            if key.test == "simple" && key.options.convention == CallingConvention::Rust {
-+                result.check = Busted(Check);
-+            }
-+
-+            if key.test == "simple" && key.options.convention == CallingConvention::Rust && key.caller == "rustc" {
-+                result.check = Busted(Run);
-+            }
-+        }
-+
-+        if key.test == "f16" || key.test == "f128" {
-+            result.run = Skip;
-+        }
-+
-         // END OF VENDOR RESERVED AREA
-         //
-         //
--- 
-2.34.1
-
diff --git a/patches/0002-abi-cafe-Enable-debuginfo.patch b/patches/0002-abi-cafe-Enable-debuginfo.patch
new file mode 100644
index 00000000000..6f5c588f2b2
--- /dev/null
+++ b/patches/0002-abi-cafe-Enable-debuginfo.patch
@@ -0,0 +1,24 @@
+From 236df390f3bc4ed69c26f4d51d584bea246da886 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] Enable debuginfo
+
+---
+ src/toolchains/rust.rs | 1 +
+ 1 file changed, 1 insertions(+)
+
+diff --git a/src/toolchains/rust.rs b/src/toolchains/rust.rs
+index 0c50f7a..bfde2b1 100644
+--- a/src/toolchains/rust.rs
++++ b/src/toolchains/rust.rs
+@@ -83,6 +83,7 @@ impl Toolchain for RustcToolchain {
+             .arg(out_dir)
+             .arg("--target")
+             .arg(&self.platform_info.target)
++            .arg("-g")
+             .arg(format!("-Cmetadata={lib_name}"))
+             .arg(src_path);
+         if let Some(codegen_backend) = &self.codegen_backend {
+-- 
+2.34.1
+
diff --git a/scripts/abi-cafe-rules.toml b/scripts/abi-cafe-rules.toml
new file mode 100644
index 00000000000..54f9445c8e5
--- /dev/null
+++ b/scripts/abi-cafe-rules.toml
@@ -0,0 +1,17 @@
+[target.'cfg(all(target_arch = "aarch64", target_os = "linux"))']
+'F32Array::conv_c'.busted = "check"
+
+[target.'cfg(all(target_arch = "aarch64", target_os = "macos"))']
+'SingleVariantUnion::conv_c::repr_c'.busted = "check"
+'OptionU128::conv_rust::repr_c::rustc_caller'.busted = "run"
+'OptionU128::conv_rust::repr_c::cgclif_caller'.busted = "check"
+
+[target.'cfg(all(target_arch = "x86_64", windows))']
+'simple::conv_rust'.busted = "check"
+'simple::conv_rust::rustc_caller'.busted = "run"
+
+[target.'*'.'f16']
+run = "skip"
+
+[target.'*'.'f128']
+run = "skip"