mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
std.Target: Factor arch/ABI into FreeBSD minimum OS version selection.
Based on data in std.zig.target.
This commit is contained in:
parent
eeaa1b17c6
commit
0e3609b8e0
1 changed files with 13 additions and 1 deletions
|
|
@ -522,7 +522,19 @@ pub const Os = struct {
|
|||
},
|
||||
.freebsd => .{
|
||||
.semver = .{
|
||||
.min = .{ .major = 13, .minor = 4, .patch = 0 },
|
||||
.min = blk: {
|
||||
const default_min: std.SemanticVersion = .{ .major = 13, .minor = 4, .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 = 14, .minor = 2, .patch = 0 },
|
||||
},
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue