zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit a4b3e695af47a93788b265b0fc4a55d4dded1ef3 (tree)
parent e0ab685467567f6da02be865654a2c4dc5f8c3a9
Author: LemonBoy <thatlemon@gmail.com>
Date:   Wed,  9 Oct 2019 17:08:07 +0200

Shuffle around some stack-probing functions

Diffstat:
Mlib/std/special/compiler_rt.zig | 14++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/lib/std/special/compiler_rt.zig b/lib/std/special/compiler_rt.zig @@ -234,14 +234,16 @@ comptime { @export("__aeabi_dcmpun", @import("compiler_rt/comparedf2.zig").__unorddf2, linkage); } if (builtin.os == .windows) { - if (!builtin.link_libc) { + // Default stack-probe functions emitted by LLVM + if (is_mingw) { + @export("_alloca", @import("compiler_rt/stack_probe.zig")._chkstk, strong_linkage); + @export("___chkstk_ms", @import("compiler_rt/stack_probe.zig").___chkstk_ms, strong_linkage); + } else { @export("_chkstk", @import("compiler_rt/stack_probe.zig")._chkstk, strong_linkage); @export("__chkstk", @import("compiler_rt/stack_probe.zig").__chkstk, strong_linkage); - @export("___chkstk", @import("compiler_rt/stack_probe.zig").___chkstk, strong_linkage); - @export("__chkstk_ms", @import("compiler_rt/stack_probe.zig").__chkstk_ms, strong_linkage); - @export("___chkstk_ms", @import("compiler_rt/stack_probe.zig").___chkstk_ms, strong_linkage); - } else if (is_mingw) { - @export("___chkstk_ms", @import("compiler_rt/stack_probe.zig").___chkstk_ms, strong_linkage); + } + + if (is_mingw) { @export("__stack_chk_fail", __stack_chk_fail, strong_linkage); @export("__stack_chk_guard", __stack_chk_guard, strong_linkage); }