2019-10-24 15:29:29 +00:00
|
|
|
// Checks if the correct annotation for the efiapi ABI is passed to llvm.
|
|
|
|
|
2020-08-02 15:23:49 +00:00
|
|
|
//@ revisions:x86_64 i686 aarch64 arm riscv
|
2019-10-25 14:44:21 +00:00
|
|
|
//@[x86_64] compile-flags: --target x86_64-unknown-uefi
|
2021-06-13 18:19:39 +00:00
|
|
|
//@[x86_64] needs-llvm-components: aarch64 arm riscv
|
2019-10-25 14:44:21 +00:00
|
|
|
//@[i686] compile-flags: --target i686-unknown-linux-musl
|
2021-06-13 18:19:39 +00:00
|
|
|
//@[i686] needs-llvm-components: aarch64 arm riscv
|
2020-08-02 15:23:49 +00:00
|
|
|
//@[aarch64] compile-flags: --target aarch64-unknown-none
|
2021-06-13 18:19:39 +00:00
|
|
|
//@[aarch64] needs-llvm-components: aarch64 arm riscv
|
2019-10-25 14:44:21 +00:00
|
|
|
//@[arm] compile-flags: --target armv7r-none-eabi
|
2021-06-13 18:19:39 +00:00
|
|
|
//@[arm] needs-llvm-components: aarch64 arm riscv
|
2020-08-02 15:23:49 +00:00
|
|
|
//@[riscv] compile-flags: --target riscv64gc-unknown-none-elf
|
2021-06-13 18:19:39 +00:00
|
|
|
//@[riscv] needs-llvm-components: aarch64 arm riscv
|
2019-10-24 15:29:29 +00:00
|
|
|
//@ compile-flags: -C no-prepopulate-passes
|
|
|
|
|
|
|
|
#![crate_type = "lib"]
|
2022-12-16 20:02:22 +00:00
|
|
|
#![feature(no_core, lang_items)]
|
2019-10-25 14:44:21 +00:00
|
|
|
#![no_core]
|
2019-10-24 15:29:29 +00:00
|
|
|
|
2024-05-29 04:11:20 +00:00
|
|
|
#[lang = "sized"]
|
|
|
|
trait Sized {}
|
|
|
|
#[lang = "freeze"]
|
|
|
|
trait Freeze {}
|
|
|
|
#[lang = "copy"]
|
|
|
|
trait Copy {}
|
2019-10-24 15:29:29 +00:00
|
|
|
|
2022-09-04 16:42:03 +00:00
|
|
|
//x86_64: define win64cc void @has_efiapi
|
2019-10-25 14:44:21 +00:00
|
|
|
//i686: define void @has_efiapi
|
2021-03-27 22:11:24 +00:00
|
|
|
//aarch64: define dso_local void @has_efiapi
|
2022-11-06 22:29:46 +00:00
|
|
|
//arm: define dso_local arm_aapcscc void @has_efiapi
|
2021-03-27 22:11:24 +00:00
|
|
|
//riscv: define dso_local void @has_efiapi
|
2019-10-24 15:29:29 +00:00
|
|
|
#[no_mangle]
|
2019-10-25 14:44:21 +00:00
|
|
|
pub extern "efiapi" fn has_efiapi() {}
|