rustc_trans: disable probestack when using pgo-gen.

Executables crash in the probestack function otherwise... I haven't debugged
much further than that.

Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
This commit is contained in:
Emilio Cobos Álvarez 2018-02-19 01:57:55 +01:00
parent 324ca7acd5
commit 99127abca8
No known key found for this signature in database
GPG Key ID: 056B727BB9C1027C

View File

@ -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(