From e9aacfd5c1947d0333887689f1569cf9e2cb2e12 Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Wed, 20 Jun 2018 22:07:55 +0100 Subject: [PATCH] Disable probestack when GCOV profiling is being used --- src/librustc_codegen_llvm/attributes.rs | 5 +++++ 1 file changed, 5 insertions(+) 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(