about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMarco Castelluccio <mcastelluccio@mozilla.com>2018-06-20 22:07:55 +0100
committerMarco Castelluccio <mcastelluccio@mozilla.com>2018-06-20 22:07:55 +0100
commite9aacfd5c1947d0333887689f1569cf9e2cb2e12 (patch)
treea1b2bb3ba9bceacac57d6a46e62a69a85887e675 /src
parent5230979794db209de492b3f7cc688020b72bc7c6 (diff)
downloadrust-e9aacfd5c1947d0333887689f1569cf9e2cb2e12.tar.gz
rust-e9aacfd5c1947d0333887689f1569cf9e2cb2e12.zip
Disable probestack when GCOV profiling is being used
Diffstat (limited to 'src')
-rw-r--r--src/librustc_codegen_llvm/attributes.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/librustc_codegen_llvm/attributes.rs b/src/librustc_codegen_llvm/attributes.rs
index a5d04c5c576..429acbbe0c2 100644
--- a/src/librustc_codegen_llvm/attributes.rs
+++ b/src/librustc_codegen_llvm/attributes.rs
@@ -98,6 +98,11 @@ pub fn set_probestack(cx: &CodegenCx, llfn: ValueRef) {
         return;
     }
 
+    // probestack doesn't play nice either with gcov profiling.
+    if cx.sess().opts.debugging_opts.profile {
+        return;
+    }
+
     // Flag our internal `__rust_probestack` function as the stack probe symbol.
     // This is defined in the `compiler-builtins` crate for each architecture.
     llvm::AddFunctionAttrStringValue(