zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 32b250109f0f0d0e869e1dd5d5b1efd63408f58f (tree)
parent de13923d694e2074c81849c3b88ec8ec4f35a8d2
Author: Alex Rønne Petersen <alex@alexrp.com>
Date:   Sun, 30 Nov 2025 22:32:42 +0100

std.Target: add isOpenBSDLibC()

Diffstat:
Mlib/std/Target.zig | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/lib/std/Target.zig b/lib/std/Target.zig @@ -2140,6 +2140,13 @@ pub inline fn isNetBSDLibC(target: *const Target) bool { }; } +pub inline fn isOpenBSDLibC(target: *const Target) bool { + return switch (target.abi) { + .none, .eabi, .eabihf => target.os.tag == .openbsd, + else => false, + }; +} + pub inline fn isWasiLibC(target: *const Target) bool { return target.os.tag == .wasi and target.abi.isMusl(); }