gpu-dawn: if binaries are unavailable, exit with error

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-02-27 15:11:41 -07:00
parent 54772dd98c
commit 4860240e4e

View file

@ -218,8 +218,9 @@ pub fn linkFromBinary(b: *Builder, step: *std.build.LibExeObjStep, options: Opti
else => false,
};
if (!binaries_available) {
std.debug.print("\nnote: gpu-dawn binaries for {s} not available, building from source (may take 5-10 minutes.)\nPlease open an issue: https://github.com/hexops/mach/issues\n", .{zig_triple});
return linkFromSource(b, step, options);
std.log.err("\nerror: gpu-dawn binaries for {s} not available. Please open an issue: https://github.com/hexops/mach/issues\n\n", .{zig_triple});
std.log.err("Build from source (takes 5-10 minutes) using -Dfrom-source=true or via `.from_source = true` in Options", .{});
std.process.exit(1);
}
ensureBinaryDownloaded(b.allocator, zig_triple, b.is_release, options.binary_version);