Skip to content

Commit

Permalink
Unrolled build for rust-lang#137530
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#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.
  • Loading branch information
rust-timer authored Feb 25, 2025
2 parents 7d8c6e7 + 264f2c6 commit 9219af8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/assembly/dwarf-mixed-versions-lto.rs
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

0 comments on commit 9219af8

Please sign in to comment.