mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
8a50bcbdce
Remove the unstable `extern "wasm"` ABI (`wasm_abi` feature tracked in #83788). As discussed in https://github.com/rust-lang/rust/pull/127513#issuecomment-2220410679 and following, this ABI is a failed experiment that did not end up being used for anything. Keeping support for this ABI in LLVM 19 would require us to switch wasm targets to the `experimental-mv` ABI, which we do not want to do. It should be noted that `Abi::Wasm` was internally used for two things: The `-Z wasm-c-abi=legacy` ABI that is still used by default on some wasm targets, and the `extern "wasm"` ABI. Despite both being `Abi::Wasm` internally, they were not the same. An explicit `extern "wasm"` additionally enabled the `+multivalue` feature. I've opted to remove `Abi::Wasm` in this patch entirely, instead of keeping it as an ABI with only internal usage. Both `-Z wasm-c-abi` variants are now treated as part of the normal C ABI, just with different different treatment in adjust_for_foreign_abi.
67 lines
2.6 KiB
Rust
67 lines
2.6 KiB
Rust
//@ revisions: x64 i686 aarch64 arm riscv32 riscv64
|
|
//
|
|
//@ [x64] needs-llvm-components: x86
|
|
//@ [x64] compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=rlib
|
|
//@ [i686] needs-llvm-components: x86
|
|
//@ [i686] compile-flags: --target=i686-unknown-linux-gnu --crate-type=rlib
|
|
//@ [aarch64] needs-llvm-components: aarch64
|
|
//@ [aarch64] compile-flags: --target=aarch64-unknown-linux-gnu --crate-type=rlib
|
|
//@ [arm] needs-llvm-components: arm
|
|
//@ [arm] compile-flags: --target=armv7-unknown-linux-gnueabihf --crate-type=rlib
|
|
//@ [riscv32] needs-llvm-components: riscv
|
|
//@ [riscv32] compile-flags: --target=riscv32i-unknown-none-elf --crate-type=rlib
|
|
//@ [riscv64] needs-llvm-components: riscv
|
|
//@ [riscv64] compile-flags: --target=riscv64gc-unknown-none-elf --crate-type=rlib
|
|
#![no_core]
|
|
#![feature(
|
|
no_core,
|
|
lang_items,
|
|
abi_ptx,
|
|
abi_msp430_interrupt,
|
|
abi_avr_interrupt,
|
|
abi_x86_interrupt,
|
|
abi_riscv_interrupt
|
|
)]
|
|
#[lang = "sized"]
|
|
trait Sized {}
|
|
|
|
extern "ptx-kernel" fn ptx() {}
|
|
//~^ ERROR is not a supported ABI
|
|
extern "aapcs" fn aapcs() {}
|
|
//[x64]~^ ERROR is not a supported ABI
|
|
//[i686]~^^ ERROR is not a supported ABI
|
|
//[aarch64]~^^^ ERROR is not a supported ABI
|
|
//[riscv32]~^^^^ ERROR is not a supported ABI
|
|
//[riscv64]~^^^^^ ERROR is not a supported ABI
|
|
extern "msp430-interrupt" fn msp430() {}
|
|
//~^ ERROR is not a supported ABI
|
|
extern "avr-interrupt" fn avr() {}
|
|
//~^ ERROR is not a supported ABI
|
|
extern "riscv-interrupt-m" fn riscv() {}
|
|
//[arm]~^ ERROR is not a supported ABI
|
|
//[x64]~^^ ERROR is not a supported ABI
|
|
//[i686]~^^^ ERROR is not a supported ABI
|
|
//[aarch64]~^^^^ ERROR is not a supported ABI
|
|
extern "x86-interrupt" fn x86() {}
|
|
//[aarch64]~^ ERROR is not a supported ABI
|
|
//[arm]~^^ ERROR is not a supported ABI
|
|
//[riscv32]~^^^ ERROR is not a supported ABI
|
|
//[riscv64]~^^^^ ERROR is not a supported ABI
|
|
extern "thiscall" fn thiscall() {}
|
|
//[x64]~^ ERROR is not a supported ABI
|
|
//[arm]~^^ ERROR is not a supported ABI
|
|
//[aarch64]~^^^ ERROR is not a supported ABI
|
|
//[riscv32]~^^^^ ERROR is not a supported ABI
|
|
//[riscv64]~^^^^^ ERROR is not a supported ABI
|
|
extern "stdcall" fn stdcall() {}
|
|
//[x64]~^ WARN use of calling convention not supported
|
|
//[x64]~^^ WARN this was previously accepted
|
|
//[arm]~^^^ WARN use of calling convention not supported
|
|
//[arm]~^^^^ WARN this was previously accepted
|
|
//[aarch64]~^^^^^ WARN use of calling convention not supported
|
|
//[aarch64]~^^^^^^ WARN this was previously accepted
|
|
//[riscv32]~^^^^^^^ WARN use of calling convention not supported
|
|
//[riscv32]~^^^^^^^^ WARN this was previously accepted
|
|
//[riscv64]~^^^^^^^^^ WARN use of calling convention not supported
|
|
//[riscv64]~^^^^^^^^^^ WARN this was previously accepted
|