compiler_rt: fix duplicate symbol error when linking libc on arm64 Windows

This commit is contained in:
Jakub Konka 2022-11-03 14:41:28 +01:00
parent 57dbeb90af
commit 480c3c4d0a

View File

@ -18,15 +18,15 @@ comptime {
if (is_mingw) {
@export(_chkstk, .{ .name = "_alloca", .linkage = strong_linkage });
@export(___chkstk_ms, .{ .name = "___chkstk_ms", .linkage = strong_linkage });
if (arch.isAARCH64()) {
@export(__chkstk, .{ .name = "__chkstk", .linkage = strong_linkage });
}
} else if (!builtin.link_libc) {
// This symbols are otherwise exported by MSVCRT.lib
@export(_chkstk, .{ .name = "_chkstk", .linkage = strong_linkage });
@export(__chkstk, .{ .name = "__chkstk", .linkage = strong_linkage });
}
if (arch.isAARCH64()) {
@export(__chkstk, .{ .name = "__chkstk", .linkage = strong_linkage });
}
}
switch (arch) {