From b7d7446fbbfc35f291ffb641470233a7a9e18b9b Mon Sep 17 00:00:00 2001 From: kcbanner Date: Wed, 16 Jul 2025 23:42:35 -0400 Subject: [PATCH] compiler_rt: export all the chkstk variations on MinGW --- lib/compiler_rt/stack_probe.zig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/compiler_rt/stack_probe.zig b/lib/compiler_rt/stack_probe.zig index afc124196f..94212b7a23 100644 --- a/lib/compiler_rt/stack_probe.zig +++ b/lib/compiler_rt/stack_probe.zig @@ -13,11 +13,11 @@ comptime { // Default stack-probe functions emitted by LLVM if (builtin.target.isMinGW()) { @export(&_chkstk, .{ .name = "_alloca", .linkage = common.linkage, .visibility = common.visibility }); + @export(&__chkstk, .{ .name = "__chkstk", .linkage = common.linkage, .visibility = common.visibility }); + @export(&___chkstk, .{ .name = "__alloca", .linkage = common.linkage, .visibility = common.visibility }); + @export(&___chkstk, .{ .name = "___chkstk", .linkage = common.linkage, .visibility = common.visibility }); + @export(&__chkstk_ms, .{ .name = "__chkstk_ms", .linkage = common.linkage, .visibility = common.visibility }); @export(&___chkstk_ms, .{ .name = "___chkstk_ms", .linkage = common.linkage, .visibility = common.visibility }); - - if (arch == .thumb or arch == .aarch64) { - @export(&__chkstk, .{ .name = "__chkstk", .linkage = common.linkage, .visibility = common.visibility }); - } } else if (!builtin.link_libc) { // This symbols are otherwise exported by MSVCRT.lib @export(&_chkstk, .{ .name = "_chkstk", .linkage = common.linkage, .visibility = common.visibility });