Skip to content

Commit 28a1852

Browse files
Limit efiapi calling convention to supported arches
Supported architectures in UEFI are described here: https://uefi.org/specs/UEFI/2.10/02_Overview.html#calling-conventions #65815
1 parent 6b8d9dd commit 28a1852

File tree

1 file changed

+3
-1
lines changed
  • compiler/rustc_target/src/spec

1 file changed

+3
-1
lines changed

compiler/rustc_target/src/spec/mod.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1941,8 +1941,10 @@ impl Target {
19411941
| PlatformIntrinsic
19421942
| Unadjusted
19431943
| Cdecl { .. }
1944-
| EfiApi
19451944
| RustCold => true,
1945+
EfiApi => {
1946+
["arm", "aarch64", "riscv32", "riscv64", "x86", "x86_64"].contains(&&self.arch[..])
1947+
}
19461948
X86Interrupt => ["x86", "x86_64"].contains(&&self.arch[..]),
19471949
Aapcs { .. } => "arm" == self.arch,
19481950
CCmseNonSecureCall => ["arm", "aarch64"].contains(&&self.arch[..]),

0 commit comments

Comments
 (0)