commit 309ff9c34ea28b89a02ef69b11c610cd5e062ca2 (tree) parent 46042170cba21cd91a090c20c2d5c6840648a0ad Author: Alex Rønne Petersen <alex@alexrp.com> Date: Mon, 21 Apr 2025 06:51:51 +0200 std.Target: Add isFreeBSDLibC() function. Diffstat:
| M | lib/std/Target.zig | | | 7 | +++++++ |
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/lib/std/Target.zig b/lib/std/Target.zig @@ -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(); }