Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
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 standard library. Private Function

appendCcExe

Private Function
std.zig.LibCInstallation.appendCcExe
fn appendCcExe(
    args: *std.array_list.Managed([]const u8),
    skip_cc_env_var: bool,
    environ_map: *const Environ.Map,
) !void

Params

File

zig/LibCInstallation.zig:681
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
fn appendCcExe(
    args: *std.array_list.Managed([]const u8),
    skip_cc_env_var: bool,
    environ_map: *const Environ.Map,
) !void {
    const default_cc_exe = if (is_windows) "cc.exe" else "cc";
    try args.ensureUnusedCapacity(1);
    if (skip_cc_env_var) {
        args.appendAssumeCapacity(default_cc_exe);
        return;
    }
    const cc_env_var = std.zig.EnvVar.CC.get(environ_map) orelse {
        args.appendAssumeCapacity(default_cc_exe);
        return;
    };
    // Respect space-separated flags to the C compiler.
    var it = std.mem.tokenizeScalar(u8, cc_env_var, ' ');
    while (it.next()) |arg| {
        try args.append(arg);
    }
}