mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 19:53:46 +00:00
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.
This commit is contained in:
parent
ad3de7fdb5
commit
426d701f8b
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user