{mach,core}: use inferred error sets during build

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2023-07-03 08:54:42 -07:00
parent 7a03a73ee0
commit 906cdc19a1
2 changed files with 4 additions and 10 deletions

View file

@ -91,9 +91,6 @@ pub fn Sdk(comptime deps: anytype) type {
const web_install_dir = std.build.InstallDir{ .custom = "www" };
pub const InitError = error{OutOfMemory} || std.zig.system.NativeTargetInfo.DetectError;
pub const LinkError = deps.glfw.LinkError;
pub const Platform = enum {
native,
web,
@ -115,7 +112,7 @@ pub fn Sdk(comptime deps: anytype) type {
res_dirs: ?[]const []const u8 = null,
watch_paths: ?[]const []const u8 = null,
},
) InitError!App {
) !App {
const target = (try std.zig.system.NativeTargetInfo.detect(options.target)).target;
const platform = Platform.fromTarget(target);
@ -179,7 +176,7 @@ pub fn Sdk(comptime deps: anytype) type {
};
}
pub fn link(app: *const App, options: Options) LinkError!void {
pub fn link(app: *const App, options: Options) !void {
if (app.platform != .web) {
try deps.glfw.link(app.b, app.step, options.glfw_options);
deps.gpu.link(app.b, app.step, options.gpuOptions()) catch return error.FailedToLinkGPU;