From 932a0a99798c5a3f4b9957338e24f49690e82dbe Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Sun, 17 Sep 2023 17:19:43 -0700 Subject: [PATCH] fix straggling transitive dependencies Helps hexops/mach#902 Signed-off-by: Stephen Gutekanst --- build.zig | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build.zig b/build.zig index 7cd810d0..0ef79a7d 100644 --- a/build.zig +++ b/build.zig @@ -89,6 +89,7 @@ fn testStep(b: *std.Build, optimize: std.builtin.OptimizeMode, target: std.zig.C pub const App = struct { b: *std.Build, + mach_builder: *std.Build, name: []const u8, compile: *std.build.Step.Compile, install: *std.build.Step.InstallArtifact, @@ -140,6 +141,7 @@ pub const App = struct { return .{ .core = app, .b = app.b, + .mach_builder = mach_builder, .name = app.name, .compile = app.compile, .install = app.install, @@ -149,14 +151,14 @@ pub const App = struct { } pub fn link(app: *const App) !void { - sysaudio.link(app.b.dependency("mach_sysaudio", .{ + sysaudio.link(app.mach_builder.dependency("mach_sysaudio", .{ .target = app.compile.target, .optimize = app.compile.optimize, }).builder, app.compile); // TODO: basisu support in wasm if (app.platform != .web) { - app.compile.linkLibrary(app.b.dependency("mach_basisu", .{ + app.compile.linkLibrary(app.mach_builder.dependency("mach_basisu", .{ .target = app.compile.target, .optimize = app.compile.optimize, }).artifact("mach-basisu"));