Rollup merge of #137530 - LukasWoodtli:gardena/lw/mips_dwarf, r=jieyouxu

DWARF mixed versions with LTO on MIPS

On MIPS the DWARF version is stored in 2 bytes with the `.2byte` assembler directive.
This commit is contained in:
Michael Goulet 2025-02-24 19:21:48 -05:00 committed by GitHub
commit 296faa87a8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,5 +1,6 @@
// This test ensures that if LTO occurs between crates with different DWARF versions, we
// will choose the highest DWARF version for the final binary. This matches Clang's behavior.
// Note: `.2byte` directive is used on MIPS.
//@ only-linux
//@ aux-build:dwarf-mixed-versions-lto-aux.rs
@ -14,6 +15,6 @@ fn main() {
}
// CHECK: .section .debug_info
// CHECK-NOT: {{\.(short|hword)}} 2
// CHECK-NOT: {{\.(short|hword)}} 4
// CHECK: {{\.(short|hword)}} 5
// CHECK-NOT: {{\.(short|hword|2byte)}} 2
// CHECK-NOT: {{\.(short|hword|2byte)}} 4
// CHECK: {{\.(short|hword|2byte)}} 5