mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
std.Target: factor arch/abi into openbsd minimum version logic
This commit is contained in:
parent
6921ae8925
commit
ac86650bf4
1 changed files with 13 additions and 1 deletions
|
|
@ -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 },
|
||||
},
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue