mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 14:23:09 +00:00
compiler-rt: Add a comment explaining why we currently need weak linkage.
This commit is contained in:
parent
90fb2d9754
commit
07c93cb103
@ -3,6 +3,9 @@ const builtin = @import("builtin");
|
|||||||
const native_endian = builtin.cpu.arch.endian();
|
const native_endian = builtin.cpu.arch.endian();
|
||||||
const ofmt_c = builtin.object_format == .c;
|
const ofmt_c = builtin.object_format == .c;
|
||||||
|
|
||||||
|
/// For now, we prefer weak linkage because some of the routines we implement here may also be
|
||||||
|
/// provided by system/dynamic libc. Eventually we should be more disciplined about this on a
|
||||||
|
/// per-symbol, per-target basis: https://github.com/ziglang/zig/issues/11883
|
||||||
pub const linkage: std.builtin.GlobalLinkage = if (builtin.is_test)
|
pub const linkage: std.builtin.GlobalLinkage = if (builtin.is_test)
|
||||||
.internal
|
.internal
|
||||||
else if (ofmt_c)
|
else if (ofmt_c)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user