diff options
| author | Jens Reidel <adrian@travitia.xyz> | 2025-09-08 20:20:03 +0200 |
|---|---|---|
| committer | Jens Reidel <adrian@travitia.xyz> | 2025-09-08 20:23:52 +0200 |
| commit | d80db5b814f594f2e1ecea2e375990287ba4d4df (patch) | |
| tree | 81c562df315da942b671870ac55310093f0e52a3 /tests/codegen-llvm | |
| parent | 68baa87ba6f03f8b6af2a368690161f1601e4040 (diff) | |
| download | rust-d80db5b814f594f2e1ecea2e375990287ba4d4df.tar.gz rust-d80db5b814f594f2e1ecea2e375990287ba4d4df.zip | |
tests/codegen-llvm: Make rust-abi-arch-specific-adjustment portable
This test currently only runs on RISC-V and loongarch hosts, but assumes that the host target is the -gnu target. By using minicore, we can run this test on all host targets, regardless of architecture, as long as the LLVM components are built. This also fixes this test on musl hosts of these architectures. Signed-off-by: Jens Reidel <adrian@travitia.xyz>
Diffstat (limited to 'tests/codegen-llvm')
| -rw-r--r-- | tests/codegen-llvm/rust-abi-arch-specific-adjustment.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/codegen-llvm/rust-abi-arch-specific-adjustment.rs b/tests/codegen-llvm/rust-abi-arch-specific-adjustment.rs index 561f081c700..ffff4b35994 100644 --- a/tests/codegen-llvm/rust-abi-arch-specific-adjustment.rs +++ b/tests/codegen-llvm/rust-abi-arch-specific-adjustment.rs @@ -1,15 +1,19 @@ +//@ add-core-stubs //@ compile-flags: -Copt-level=3 -C no-prepopulate-passes //@ revisions: riscv64 loongarch64 -//@[riscv64] only-riscv64 //@[riscv64] compile-flags: --target riscv64gc-unknown-linux-gnu //@[riscv64] needs-llvm-components: riscv -//@[loongarch64] only-loongarch64 //@[loongarch64] compile-flags: --target loongarch64-unknown-linux-gnu //@[loongarch64] needs-llvm-components: loongarch #![crate_type = "lib"] +#![feature(no_core)] +#![no_core] + +extern crate minicore; +use minicore::*; #[no_mangle] // riscv64: define noundef i8 @arg_attr_u8(i8 noundef zeroext %x) |
