gpu-dawn: improve ABI build checks

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-03-05 22:48:08 -07:00
parent cfa3674db2
commit a3cb937966

View file

@ -191,10 +191,10 @@ pub fn linkFromBinary(b: *Builder, step: *std.build.LibExeObjStep, options: Opti
const target = (std.zig.system.NativeTargetInfo.detect(b.allocator, step.target) catch unreachable).target;
const binaries_available = switch (target.os.tag) {
.windows => false, // TODO(build-system): add Windows binaries
.linux => target.cpu.arch.isX86() and (target.abi.isGnu() or target.abi == .musl),
.linux => target.cpu.arch.isX86() and (target.abi.isGnu() or target.abi.isMusl()),
.macos => blk: {
if (!target.cpu.arch.isX86() and !target.cpu.arch.isAARCH64()) break :blk false;
if (target.abi != .gnu) break :blk false;
if (!target.abi.isGnu()) break :blk false;
// If min. target macOS version is lesser than the min version we have available, then
// our binary is incompatible with the target.