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