Skip to content

Commit c6a2565

Browse files
authored
Unrolled build for #144339
Rollup merge of #144339 - CaiWeiran:dwarf-mixed-versions-lto_test, r=wesleywiser Enable dwarf-mixed-versions-lto.rs test on RISC-V (riscv64) This PR replaces [#144284](#144284) to resolve merge conflicts. This PR adds support for running the `tests/assembly/dwarf-mixed-versions-lto.rs` test on the RISC-V (riscv64) architecture. Previously, this test would fail on RISC-V targets due to architecture-specific code generation issues. This patch modifies the test to ensure compatibility while preserving its intent. The change has been tested locally using `./x test` on a riscv64 target, and the test now passes as expected. ### Notes: - This change is scoped specifically to improve RISC-V compatibility. - It does not affect behavior or test results on other architectures.
2 parents f32b232 + 3d186ea commit c6a2565

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/assembly-llvm/dwarf-mixed-versions-lto.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// This test ensures that if LTO occurs between crates with different DWARF versions, we
22
// will choose the highest DWARF version for the final binary. This matches Clang's behavior.
33
// Note: `.2byte` directive is used on MIPS.
4+
// Note: `.half` directive is used on RISC-V.
45

56
//@ only-linux
67
//@ aux-build:dwarf-mixed-versions-lto-aux.rs
@@ -15,6 +16,6 @@ fn main() {
1516
}
1617

1718
// CHECK: .section .debug_info
18-
// CHECK-NOT: {{\.(short|hword|2byte)}} 2
19-
// CHECK-NOT: {{\.(short|hword|2byte)}} 4
20-
// CHECK: {{\.(short|hword|2byte)}} 5
19+
// CHECK-NOT: {{\.(short|hword|2byte|half)}} 2
20+
// CHECK-NOT: {{\.(short|hword|2byte|half)}} 4
21+
// CHECK: {{\.(short|hword|2byte|half)}} 5

0 commit comments

Comments
 (0)