Skip to content

Commit

Permalink
addPaths(step) -> addPaths(mod); helps hexops/mach#1154
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
  • Loading branch information
emidoots committed Feb 2, 2024
1 parent 370bc15 commit 6a62bcc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pub fn build(b: *std.Build) !void {
while (iter.next()) |e| {
main_tests.root_module.addImport(e.key_ptr.*, e.value_ptr.*);
}
link(b, main_tests);
link(b, main_tests, &main_tests.root_module);
b.installArtifact(main_tests);

const test_step = b.step("test", "run tests");
Expand Down Expand Up @@ -195,7 +195,7 @@ pub const App = struct {

// Link dependencies
if (platform != .web) {
link(core_builder, compile);
link(core_builder, compile, &compile.root_module);
}

const run = app_builder.addRunArtifact(compile);
Expand All @@ -213,11 +213,11 @@ pub const App = struct {
}
};

pub fn link(core_builder: *std.Build, step: *std.Build.Step.Compile) void {
pub fn link(core_builder: *std.Build, step: *std.Build.Step.Compile, mod: *std.Build.Module) void {
gpu.link(core_builder.dependency("mach_gpu", .{
.target = step.root_module.resolved_target orelse core_builder.host,
.optimize = step.root_module.optimize.?,
}).builder, step, .{}) catch unreachable;
}).builder, step, mod, .{}) catch unreachable;
}

comptime {
Expand Down
8 changes: 4 additions & 4 deletions build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@
// .hash = "1220468021e8ad528defe092cc36ad4342555d2106482781665e8672c9e3345b5d6b",
// },
.mach_gpu = .{
.url = "https://pkg.machengine.org/mach-gpu/7f6792dbc5cd41da5f54b322b6d5be79d6dda2f1.tar.gz",
.hash = "122044bcebd28b7d54fb40cbebc04ef6bab0a385952e3193bcf90b37e062ce382495",
.url = "https://pkg.machengine.org/mach-gpu/47244d1e216284a3389bd42af431f59f39a8f67e.tar.gz",
.hash = "1220e77a3e8386f57f73685026e43a17385ec8b3fb6e9873c9c793defd30651cfa09",
},
.mach_glfw = .{
.url = "https://pkg.machengine.org/mach-glfw/d686078fcf2f4d8d94532ae28ba45e4b38aab31c.tar.gz",
.hash = "1220e0d40d19f6b61d6b1290401504e8052aeb980395a500ffb2bc351f749b42ec47",
.url = "https://pkg.machengine.org/mach-glfw/63da35e57c3695a787b927e69e4140eb74ffc234.tar.gz",
.hash = "1220fda87b59df6353864651cdd3943f1159d8d517a45cd67bed493fe6c0a0c78c17",
},
},
}

0 comments on commit 6a62bcc

Please sign in to comment.