std.Target: Add isNetBSDLibC() function.

This commit is contained in:
Alex Rønne Petersen 2025-05-13 01:02:22 +02:00
parent 8a7d925d36
commit 6028db7f29
No known key found for this signature in database

View File

@ -2072,6 +2072,13 @@ pub inline fn isFreeBSDLibC(target: Target) bool {
};
}
pub inline fn isNetBSDLibC(target: Target) bool {
return switch (target.abi) {
.none, .eabi, .eabihf => target.os.tag == .netbsd,
else => false,
};
}
pub inline fn isWasiLibC(target: Target) bool {
return target.os.tag == .wasi and target.abi.isMusl();
}