From 99ea117f29750bc6517e0c0365aa00a643b1c862 Mon Sep 17 00:00:00 2001 From: ArchGuy Date: Fri, 16 Aug 2024 16:40:12 +0800 Subject: [PATCH] Use ___chkstk_ms for mingw --- lib/vm/src/probestack.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/vm/src/probestack.rs b/lib/vm/src/probestack.rs index fd78d8d0b2c..814ddf9c20c 100644 --- a/lib/vm/src/probestack.rs +++ b/lib/vm/src/probestack.rs @@ -42,10 +42,10 @@ cfg_if::cfg_if! { // ___chkstk (note the triple underscore) is implemented in compiler-builtins/src/x86_64.rs // by the Rust compiler for the MinGW target #[cfg(all(target_os = "windows", target_env = "gnu"))] - pub fn ___chkstk(); + pub fn ___chkstk_ms(); } /// The probestack for Windows when compiled with GNU - pub const PROBESTACK: unsafe extern "C" fn() = ___chkstk; + pub const PROBESTACK: unsafe extern "C" fn() = ___chkstk_ms; } else if #[cfg(not(any(target_arch = "x86_64", target_arch = "x86")))] { // As per // https://github.com/rust-lang/compiler-builtins/blob/cae3e6ea23739166504f9f9fb50ec070097979d4/src/probestack.rs#L39,