about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/SymbolWrapper.cpp
diff options
context:
space:
mode:
authorStuart Cook <Zalathar@users.noreply.github.com>2025-08-19 14:18:19 +1000
committerGitHub <noreply@github.com>2025-08-19 14:18:19 +1000
commit3a03bb9cbf2385008d47dc2f47df2eeadf699970 (patch)
tree78e42f278980628fc0aa7d3e2e65cf320ea3ea59 /compiler/rustc_llvm/llvm-wrapper/SymbolWrapper.cpp
parentd6645f7848cd9404a41700041eb15855c6578c5f (diff)
parent9d08596a2e315cdaa13a4c98e30c8b14853a9e9a (diff)
downloadrust-3a03bb9cbf2385008d47dc2f47df2eeadf699970.tar.gz
rust-3a03bb9cbf2385008d47dc2f47df2eeadf699970.zip
Rollup merge of #144567 - CaiWeiran:transmute-scalar_test, r=nikic
Fix RISC-V Test Failures in ./x test for Multiple Codegen Cases

This PR resolves several test failures encountered when running `./x test` on the RISC-V architecture. These failures were caused by platform-specific behavior, ABI differences, or codegen inconsistencies unique to RISC-V.

The following test cases have been fixed to ensure compatibility with RISC-V:

* `codegen-llvm/enum/enum-match.rs`
* `codegen-llvm/enum/enum-transparent-extract.rs`
* `codegen-llvm/repeat-operand-zero-len.rs`
* `codegen-llvm/enum/enum-aggregate.rs`
* `codegen-llvm/uninhabited-transparent-return-abi.rs`

In addition, this PR adjusts `tests/codegen-llvm/transmute-scalar.rs` to explicitly specify the target architecture:

```rust
//@ compile-flags: --target=x86_64-unknown-linux-gnu
//@ needs-llvm-components: x86
```

As suggested by ```@nikic,``` this test is not target-specific and already uses `minicore`, implying it is meant to run against a stable triple regardless of the host architecture. Explicitly setting the target ensures consistent codegen behavior, particularly when testing on non-x86 platforms such as riscv64.

All changes have been tested locally on a RISC-V target and now pass as expected.

### Notes:

* These fixes are scoped specifically to enable full test suite compliance for RISC-V.
* No changes impact other architectures.
* The change to `transmute-scalar.rs` aligns with the intent of [[#143915](https://github.com/rust-lang/rust/pull/143915)](https://github.com/rust-lang/rust/pull/143915) and prevents architecture-dependent discrepancies during CI or local testing.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/SymbolWrapper.cpp')
0 files changed, 0 insertions, 0 deletions