authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-05-18 22:24:42+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-05-19 00:22:03+02:00
log07c93cb103c8010b97a91029e15e1b238fbe5eb3
tree7ad799477f9d59cd644147bf9417bbb5c370e642
parent90fb2d97542e5a9fdb8ebf4fcc85b9f900dd3e66
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

compiler-rt: Add a comment explaining why we currently need weak linkage.


1 files changed, 3 insertions(+), 0 deletions(-)

lib/compiler_rt/common.zig+3
......@@ -3,6 +3,9 @@ const builtin = @import("builtin");
33const native_endian = builtin.cpu.arch.endian();
44const ofmt_c = builtin.object_format == .c;
55
6/// For now, we prefer weak linkage because some of the routines we implement here may also be
7/// provided by system/dynamic libc. Eventually we should be more disciplined about this on a
8/// per-symbol, per-target basis: https://github.com/ziglang/zig/issues/11883
69pub const linkage: std.builtin.GlobalLinkage = if (builtin.is_test)
710 .internal
811else if (ofmt_c)