Zig 0.17.0-dev (Split by item)

This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.

linkage

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

compiler_rt.linkage
pub const linkage: std.builtin.GlobalLinkage = if (builtin.is_test)
    .internal
else if (ofmt_c)
    .strong
else
    .weak

File

lib/compiler_rt.zig:31

Code

pub const linkage: std.builtin.GlobalLinkage = if (builtin.is_test)
    .internal
else if (ofmt_c)
    .strong
else
    .weak