gpu-dawn: improve binary version selection
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
d2ca4391e9
commit
bbbfe71dc2
1 changed files with 6 additions and 5 deletions
|
|
@ -220,11 +220,12 @@ pub fn Sdk(comptime deps: anytype) type {
|
||||||
.macos => blk: {
|
.macos => blk: {
|
||||||
if (!target.cpu.arch.isX86() and !target.cpu.arch.isAARCH64()) break :blk false;
|
if (!target.cpu.arch.isX86() and !target.cpu.arch.isAARCH64()) break :blk false;
|
||||||
|
|
||||||
// If min. target macOS version is lesser than the min version we have available, then
|
// The minimum macOS version with which our binaries can be used.
|
||||||
// our binary is incompatible with the target.
|
const min_available = std.SemanticVersion{ .major = 11, .minor = 0, .patch = 0 };
|
||||||
const min_available = std.SemanticVersion{ .major = 11, .minor = 0, .patch = std.math.maxInt(u32) };
|
|
||||||
if (target.os.version_range.semver.min.order(min_available) == .lt) break :blk false;
|
// If the target version is >= the available version, then it's OK.
|
||||||
break :blk true;
|
const order = target.os.version_range.semver.min.order(min_available);
|
||||||
|
break :blk (order == .gt or order == .eq);
|
||||||
},
|
},
|
||||||
else => false,
|
else => false,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue