mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-27 19:09:47 +03:00
std.Target: factor arch/abi into openbsd minimum version logic
This commit is contained in:
+13
-1
@@ -533,7 +533,19 @@ pub const Os = struct {
|
||||
},
|
||||
.openbsd => .{
|
||||
.semver = .{
|
||||
.min = .{ .major = 7, .minor = 7, .patch = 0 },
|
||||
.min = blk: {
|
||||
const default_min: std.SemanticVersion = .{ .major = 7, .minor = 7, .patch = 0 };
|
||||
|
||||
for (std.zig.target.available_libcs) |libc| {
|
||||
if (libc.arch != arch or libc.os != tag or libc.abi != abi) continue;
|
||||
|
||||
if (libc.os_ver) |min| {
|
||||
if (min.order(default_min) == .gt) break :blk min;
|
||||
}
|
||||
}
|
||||
|
||||
break :blk default_min;
|
||||
},
|
||||
.max = .{ .major = 7, .minor = 8, .patch = 0 },
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user