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.

setUpModule

TranslateC.setUpModule
fn setUpModule(translate_c: *TranslateC, module: *std.Build.Module) *std.Build.Module

File

lib/std/Build/Step/TranslateC.zig:85

Code

fn setUpModule(translate_c: *TranslateC, module: *std.Build.Module) *std.Build.Module {
    const graph = translate_c.step.owner.graph;
    const arena = graph.arena;

    if (translate_c.link_libc) module.link_libc = true;

    for (translate_c.system_libs.items) |system_lib| {
        module.link_objects.append(arena, .{ .system_lib = system_lib }) catch @panic("OOM");
    }

    return module;
}