Set target-abi module flag for RISC-V targets
Fixes cross-language LTO on RISC-V targets (Fixes #121924)
This commit is contained in:
parent
f65f84feb0
commit
f19c48e7a8
10 changed files with 115 additions and 21 deletions
20
tests/codegen/riscv-target-abi.rs
Normal file
20
tests/codegen/riscv-target-abi.rs
Normal file
|
@ -0,0 +1,20 @@
|
|||
//@ revisions:riscv64gc riscv32gc riscv32imac
|
||||
|
||||
//@[riscv64gc] compile-flags: --target=riscv64gc-unknown-linux-gnu
|
||||
//@[riscv64gc] needs-llvm-components: riscv
|
||||
// riscv64gc: !{i32 1, !"target-abi", !"lp64d"}
|
||||
|
||||
//@[riscv32gc] compile-flags: --target=riscv32gc-unknown-linux-musl
|
||||
//@[riscv32gc] needs-llvm-components: riscv
|
||||
// riscv32gc: !{i32 1, !"target-abi", !"ilp32d"}
|
||||
|
||||
//@[riscv32imac] compile-flags: --target=riscv32imac-unknown-none-elf
|
||||
//@[riscv32imac] needs-llvm-components: riscv
|
||||
// riscv32imac-NOT: !"target-abi"
|
||||
|
||||
#![feature(no_core, lang_items)]
|
||||
#![crate_type = "lib"]
|
||||
#![no_core]
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
Loading…
Add table
Add a link
Reference in a new issue