authorgravatar for rsepassi@gmail.comRyan Sepassi <rsepassi@gmail.com> 2024-07-11 13:20:06-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2024-07-11 20:20:06+00:00
log45be80364659332807b527670514332a4b835f84
treeac086be6b07c43b19d433924240d42821d0141d5
parent95d9292a7a09ed883e65510ec054619747315c48
signaturebadge-check Signed by PGP key B5690EEEBB952194

Update `__chkstk_ms` to have weak linkage (#20138)

* Update `__chkstk_ms` to have weak linkage `__chkstk_ms` was causing conflicts during linking in some circumstances (specifically with linking object files from Rust sources). This PR switches `__chkstk_ms` to have weak linkage. #15107 * Update stack_probe.zig to weak linkage for all symbols

1 files changed, 5 insertions(+), 5 deletions(-)

lib/compiler_rt/stack_probe.zig+5-5
...@@ -16,16 +16,16 @@ comptime {...@@ -16,16 +16,16 @@ comptime {
16 if (builtin.os.tag == .windows) {16 if (builtin.os.tag == .windows) {
17 // Default stack-probe functions emitted by LLVM17 // Default stack-probe functions emitted by LLVM
18 if (is_mingw) {18 if (is_mingw) {
19 @export(_chkstk, .{ .name = "_alloca", .linkage = strong_linkage });19 @export(_chkstk, .{ .name = "_alloca", .linkage = linkage });
20 @export(___chkstk_ms, .{ .name = "___chkstk_ms", .linkage = strong_linkage });20 @export(___chkstk_ms, .{ .name = "___chkstk_ms", .linkage = linkage });
2121
22 if (arch.isAARCH64()) {22 if (arch.isAARCH64()) {
23 @export(__chkstk, .{ .name = "__chkstk", .linkage = strong_linkage });23 @export(__chkstk, .{ .name = "__chkstk", .linkage = linkage });
24 }24 }
25 } else if (!builtin.link_libc) {25 } else if (!builtin.link_libc) {
26 // This symbols are otherwise exported by MSVCRT.lib26 // This symbols are otherwise exported by MSVCRT.lib
27 @export(_chkstk, .{ .name = "_chkstk", .linkage = strong_linkage });27 @export(_chkstk, .{ .name = "_chkstk", .linkage = linkage });
28 @export(__chkstk, .{ .name = "__chkstk", .linkage = strong_linkage });28 @export(__chkstk, .{ .name = "__chkstk", .linkage = linkage });
29 }29 }
30 }30 }
3131