Skip to content

Commit 3451294

Browse files
authored
Unrolled build for #146344
Rollup merge of #146344 - Gelbpunkt:loongarch-codegen-llvm-test, r=Mark-Simulacrum 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 (though I've only tested on loongarch64-unknown-linux-musl).
2 parents a454fcc + d80db5b commit 3451294

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/codegen-llvm/rust-abi-arch-specific-adjustment.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
1+
//@ add-core-stubs
12
//@ compile-flags: -Copt-level=3 -C no-prepopulate-passes
23
//@ revisions: riscv64 loongarch64
34

4-
//@[riscv64] only-riscv64
55
//@[riscv64] compile-flags: --target riscv64gc-unknown-linux-gnu
66
//@[riscv64] needs-llvm-components: riscv
77

8-
//@[loongarch64] only-loongarch64
98
//@[loongarch64] compile-flags: --target loongarch64-unknown-linux-gnu
109
//@[loongarch64] needs-llvm-components: loongarch
1110

1211
#![crate_type = "lib"]
12+
#![feature(no_core)]
13+
#![no_core]
14+
15+
extern crate minicore;
16+
use minicore::*;
1317

1418
#[no_mangle]
1519
// riscv64: define noundef i8 @arg_attr_u8(i8 noundef zeroext %x)

0 commit comments

Comments
 (0)