about summary refs log tree commit diff
path: root/tests/codegen
diff options
context:
space:
mode:
authorJubilee <workingjubilee@gmail.com>2024-10-21 20:32:01 -0700
committerGitHub <noreply@github.com>2024-10-21 20:32:01 -0700
commit1b24c6fc1442a00f6edb8f4381ea64c2ba017843 (patch)
treef6a976a82a0a610d19eb7645f6dd4bae5c7036d6 /tests/codegen
parent763fbf8a90902dd13102bef3411629a010059312 (diff)
parent3ea91c05db131ec7c4bd6d507b569a58cd19dd93 (diff)
downloadrust-1b24c6fc1442a00f6edb8f4381ea64c2ba017843.tar.gz
rust-1b24c6fc1442a00f6edb8f4381ea64c2ba017843.zip
Rollup merge of #131807 - beetrees:riscv-target-abi, r=workingjubilee
Always specify `llvm_abiname` for RISC-V targets

For RISC-V targets, when `llvm_abiname` is not specified LLVM will infer the ABI from the target features, causing #116344 to occur. This PR adds the correct `llvm_abiname` to all RISC-V targets where it is missing (which are all soft-float targets), and adds a test to prevent future RISC-V targets from accidentally omitting `llvm_abiname`. The only affect of this PR is that `-Ctarget-feature=+f` (or similar) will no longer affect the ABI on the modified targets.

<!-- homu-ignore:start -->
r? `@RalfJung`
<!--- homu-ignore:end -->
Diffstat (limited to 'tests/codegen')
-rw-r--r--tests/codegen/riscv-target-abi.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/codegen/riscv-target-abi.rs b/tests/codegen/riscv-target-abi.rs
index 5d545af9c76..88da4ece7ba 100644
--- a/tests/codegen/riscv-target-abi.rs
+++ b/tests/codegen/riscv-target-abi.rs
@@ -10,7 +10,7 @@
 
 //@[riscv32imac] compile-flags: --target=riscv32imac-unknown-none-elf
 //@[riscv32imac] needs-llvm-components: riscv
-// riscv32imac-NOT: !"target-abi"
+// riscv32imac: !{i32 1, !"target-abi", !"ilp32"}
 
 #![feature(no_core, lang_items)]
 #![crate_type = "lib"]