std.Target: Add isFreeBSDLibC() function.

This commit is contained in:
Alex Rønne Petersen 2025-04-21 06:51:51 +02:00
parent 46042170cb
commit 309ff9c34e
No known key found for this signature in database

View File

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