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 #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
Original file line number Diff line number Diff line change
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

5 comments on commit 426d701

@bors
Copy link
Contributor

@bors bors commented on 426d701 Apr 19, 2014

Choose a reason for hiding this comment

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

saw approval from brson
at alexcrichton@426d701

@bors
Copy link
Contributor

@bors bors commented on 426d701 Apr 19, 2014

Choose a reason for hiding this comment

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

merging alexcrichton/rust/up-llvm = 426d701 into auto

@bors
Copy link
Contributor

@bors bors commented on 426d701 Apr 19, 2014

Choose a reason for hiding this comment

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

alexcrichton/rust/up-llvm = 426d701 merged ok, testing candidate = 9b7cfd3

@bors
Copy link
Contributor

@bors bors commented on 426d701 Apr 19, 2014

@bors
Copy link
Contributor

@bors bors commented on 426d701 Apr 19, 2014

Choose a reason for hiding this comment

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

fast-forwarding master to auto = 9b7cfd3

Please sign in to comment.