mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 02:44:43 +01:00
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
This commit is contained in:
parent
95d9292a7a
commit
45be803646
1 changed files with 5 additions and 5 deletions
|
|
@ -16,16 +16,16 @@ comptime {
|
|||
if (builtin.os.tag == .windows) {
|
||||
// Default stack-probe functions emitted by LLVM
|
||||
if (is_mingw) {
|
||||
@export(_chkstk, .{ .name = "_alloca", .linkage = strong_linkage });
|
||||
@export(___chkstk_ms, .{ .name = "___chkstk_ms", .linkage = strong_linkage });
|
||||
@export(_chkstk, .{ .name = "_alloca", .linkage = linkage });
|
||||
@export(___chkstk_ms, .{ .name = "___chkstk_ms", .linkage = linkage });
|
||||
|
||||
if (arch.isAARCH64()) {
|
||||
@export(__chkstk, .{ .name = "__chkstk", .linkage = strong_linkage });
|
||||
@export(__chkstk, .{ .name = "__chkstk", .linkage = 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 });
|
||||
@export(_chkstk, .{ .name = "_chkstk", .linkage = linkage });
|
||||
@export(__chkstk, .{ .name = "__chkstk", .linkage = linkage });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue