Commit 4de3f9d853

LemonBoy <thatlemon@gmail.com>
2019-10-10 09:25:39
Fix stack-probe symbol redefinition
1 parent dfcbca8
Changed files (1)
lib
std
lib/std/special/compiler_rt.zig
@@ -238,7 +238,8 @@ comptime {
         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 {
+        } else if (!builtin.link_libc) {
+            // This symbols are otherwise exported by MSVCRT.lib
             @export("_chkstk", @import("compiler_rt/stack_probe.zig")._chkstk, strong_linkage);
             @export("__chkstk", @import("compiler_rt/stack_probe.zig").__chkstk, strong_linkage);
         }