Skip to content

Commit 426d701

Browse files
committed
debuginfo: Clamp the maximum dwarf version to 3
This is a consequence of #13611 and our bots running a "fairly old" gdb which doesn't understand the newer versions of dwarf.
1 parent ad3de7f commit 426d701

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/librustc/middle/trans/debuginfo.rs

+6
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,12 @@ pub fn finalize(cx: &CrateContext) {
279279
if cx.sess().targ_cfg.os == abi::OsMacos {
280280
"Dwarf Version".with_c_str(
281281
|s| llvm::LLVMRustAddModuleFlag(cx.llmod, s, 2));
282+
} else {
283+
// FIXME(#13611) this is a kludge fix because the linux bots have
284+
// gdb 7.4 which doesn't understand dwarf4, we should
285+
// do something more graceful here.
286+
"Dwarf Version".with_c_str(
287+
|s| llvm::LLVMRustAddModuleFlag(cx.llmod, s, 3));
282288
}
283289

284290
// Prevent bitcode readers from deleting the debug info.

0 commit comments

Comments
 (0)