Skip to content

"efiapi" is not a supported ABI for loongarch64 #149877

@ZR233

Description

@ZR233

Code

unsafe extern "efiapi" fn() {

}

Current output

error[E0570]: "efiapi" is not a supported ABI for the current target
  --> 
   |
76 |     unsafe extern "efiapi" fn(
   |                   ^^^^^^^^

Desired output

That build success in 1.89 and work fine.

Rationale and extra context

According to the LoongArch ELF psABI specification https://loongson.github.io/LoongArch-Documentation/LoongArch-ELF-ABI-CN.html and related UEFI documentation https://uefi.org/specs/UEFI/2.10/02_Overview.html#loongarch-platforms, UEFI interfaces on the LoongArch64 platform use the standard C calling convention (i.e., equivalent to extern "C"), requiring no special calling convention modifiers.

Other cases

Rust Version

rustc 1.94.0-nightly (37aa2135b 2025-12-08)
binary: rustc
commit-hash: 37aa2135b5d0936bd13aa699d941aaa94fbaa645
commit-date: 2025-12-08
host: x86_64-pc-windows-msvc
release: 1.94.0-nightly
LLVM version: 21.1.5

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions