feature. See also
. The project being documented here (as the example) is the Zig library itself.
LibCDirs.libCGenericName
fn libCGenericName(target: *const std.Target) [:0]const u8
File
Code
fn libCGenericName(target: *const std.Target) [:0]const u8 {
switch (target.os.tag) {
.windows => return "mingw",
.driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => return "darwin",
.freebsd => return "freebsd",
.netbsd => return "netbsd",
.openbsd => return "openbsd",
else => {},
}
switch (target.abi) {
.gnu,
.gnuabin32,
.gnuabi64,
.gnueabi,
.gnueabihf,
.gnuf32,
.gnusf,
.gnux32,
=> return "glibc",
.musl,
.muslabin32,
.muslabi64,
.musleabi,
.musleabihf,
.muslf32,
.muslsf,
.muslx32,
.none,
.ohos,
.ohoseabi,
=> return "musl",
.eabi,
.eabihf,
.abin32,
.x32,
.ilp32,
.android,
.androideabi,
.msvc,
.itanium,
.simulator,
.call0,
=> unreachable,
}
}