Skip to content

Commit

Permalink
Enable inline stack probes on AArch64
Browse files Browse the repository at this point in the history
Fixes #661
  • Loading branch information
bjorn3 committed Dec 22, 2022
1 parent debd45c commit 97e2213
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,12 +278,14 @@ fn build_isa(sess: &Session, backend_config: &BackendConfig) -> Box<dyn isa::Tar
}
}

if target_triple.architecture == target_lexicon::Architecture::X86_64 {
if let target_lexicon::Architecture::Aarch64(_) | target_lexicon::Architecture::X86_64 =
target_triple.architecture
{
// Windows depends on stack probes to grow the committed part of the stack
flags_builder.enable("enable_probestack").unwrap();
flags_builder.set("probestack_strategy", "inline").unwrap();
} else {
// __cranelift_probestack is not provided and inline stack probes are only supported on x86_64
// __cranelift_probestack is not provided and inline stack probes are only supported on AArch64 and x86_64
flags_builder.set("enable_probestack", "false").unwrap();
}

Expand Down

0 comments on commit 97e2213

Please sign in to comment.