From 10ae75d8f86becc95708a206c701e5b62c59c172 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 4608a0152525a..c0973fced0d5e 100644 --- a/compiler/rustc_target/src/spec/mod.rs +++ b/compiler/rustc_target/src/spec/mod.rs @@ -2815,7 +2815,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 },