Skip to content

Commit 99127ab

Browse files
committed
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>
1 parent 324ca7a commit 99127ab

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/librustc_trans/attributes.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ pub fn set_probestack(cx: &CodegenCx, llfn: ValueRef) {
9292
_ => {}
9393
}
9494

95+
// probestack doesn't play nice either with pgo-gen.
96+
if cx.sess().opts.cg.pgo_gen.is_some() {
97+
return;
98+
}
99+
95100
// Flag our internal `__rust_probestack` function as the stack probe symbol.
96101
// This is defined in the `compiler-builtins` crate for each architecture.
97102
llvm::AddFunctionAttrStringValue(

0 commit comments

Comments
 (0)