From 99127abca8c9678e14ee11bee4d46bc34ec8b164 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Mon, 19 Feb 2018 01:57:55 +0100 Subject: [PATCH] rustc_trans: disable probestack when using pgo-gen. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Executables crash in the probestack function otherwise... I haven't debugged much further than that. Signed-off-by: Emilio Cobos Álvarez --- src/librustc_trans/attributes.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/librustc_trans/attributes.rs b/src/librustc_trans/attributes.rs index df78ccdd2298..f53c1e84f6e8 100644 --- a/src/librustc_trans/attributes.rs +++ b/src/librustc_trans/attributes.rs @@ -92,6 +92,11 @@ pub fn set_probestack(cx: &CodegenCx, llfn: ValueRef) { _ => {} } + // probestack doesn't play nice either with pgo-gen. + if cx.sess().opts.cg.pgo_gen.is_some() { + 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(