about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-04-18 16:54:38 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-04-18 16:54:38 -0700
commit426d701f8bbd22aa22fefb69d71eaa7dc8bbe170 (patch)
treef54c07411a6d139539e67148a79cabb6f4a1da4c /src
parentad3de7fdb58cb2beb06780794006b4184807c75e (diff)
downloadrust-426d701f8bbd22aa22fefb69d71eaa7dc8bbe170.tar.gz
rust-426d701f8bbd22aa22fefb69d71eaa7dc8bbe170.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/librustc/middle/trans/debuginfo.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/librustc/middle/trans/debuginfo.rs b/src/librustc/middle/trans/debuginfo.rs
index fd6a465eabb..d6dd0213128 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.