From 3f6b70c3885c2dd6370d943ee735206d2ff45194 Mon Sep 17 00:00:00 2001 From: doinkythederp Date: Thu, 2 Jan 2025 15:57:45 -0800 Subject: [PATCH] ensure `arm` arch before adjusting VEXos system ABI to `aapcs` --- compiler/rustc_target/src/spec/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs index 53716236ef727..df5acfba0af65 100644 --- a/compiler/rustc_target/src/spec/mod.rs +++ b/compiler/rustc_target/src/spec/mod.rs @@ -2817,7 +2817,9 @@ impl Target { Abi::System { unwind } if self.is_like_windows && self.arch == "x86" && !c_variadic => { Abi::Stdcall { unwind } } - Abi::System { unwind } if self.is_like_vexos && !c_variadic => Abi::Aapcs { unwind }, + Abi::System { unwind } if self.is_like_vexos && self.arch == "arm" && !c_variadic => { + Abi::Aapcs { unwind } + } Abi::System { unwind } => Abi::C { unwind }, Abi::EfiApi if self.arch == "arm" => Abi::Aapcs { unwind: false }, Abi::EfiApi if self.arch == "x86_64" => Abi::Win64 { unwind: false },