Skip to content

Commit

Permalink
debuginfo: Clamp the maximum dwarf version to 3
Browse files Browse the repository at this point in the history
This is a consequence of rust-lang#13611 and our bots running a "fairly old" gdb which
doesn't understand the newer versions of dwarf.
  • Loading branch information
alexcrichton committed Apr 18, 2014
1 parent ad3de7f commit 426d701
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/librustc/middle/trans/debuginfo.rs
Expand Up @@ -279,6 +279,12 @@ pub fn finalize(cx: &CrateContext) {
if cx.sess().targ_cfg.os == abi::OsMacos {
"Dwarf Version".with_c_str(
|s| llvm::LLVMRustAddModuleFlag(cx.llmod, s, 2));
} else {
// FIXME(#13611) this is a kludge fix because the linux bots have
// gdb 7.4 which doesn't understand dwarf4, we should
// do something more graceful here.
"Dwarf Version".with_c_str(
|s| llvm::LLVMRustAddModuleFlag(cx.llmod, s, 3));
}

// Prevent bitcode readers from deleting the debug info.
Expand Down

1 comment on commit 426d701

@alexcrichton
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=brson

Please sign in to comment.