about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2022-12-22 14:02:41 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2022-12-22 14:03:02 +0000
commit97e2213c3c31909de388943ac3b1cb024decd6c2 (patch)
tree19c09544a785fc7af931ad5104063e222ddd623c
parentdebd45cc7be97c8a7c50c2822593471d04d87366 (diff)
downloadrust-97e2213c3c31909de388943ac3b1cb024decd6c2.tar.gz
rust-97e2213c3c31909de388943ac3b1cb024decd6c2.zip
Enable inline stack probes on AArch64
Fixes #661
-rw-r--r--src/lib.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 629d79d5012..70d0cc339a8 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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();
     }