diff --git a/src/librustc/middle/trans/debuginfo.rs b/src/librustc/middle/trans/debuginfo.rs index fd6a465eabb22..d6dd0213128a5 100644 --- a/src/librustc/middle/trans/debuginfo.rs +++ b/src/librustc/middle/trans/debuginfo.rs @@ -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.