From 755911747fe9f4833e006421cde7961089533f47 Mon Sep 17 00:00:00 2001 From: Alexander Saltanov Date: Tue, 6 Feb 2024 00:06:19 +0300 Subject: [PATCH] Fix zig_exe location in Build struct Reflect Zig breaking changes as of https://github.com/ziglang/zig/commit/105db13536b4dc2affe130cb8d2eee6c97c89bcd --- build.zig | 2 +- test/tests.zig | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build.zig b/build.zig index ea47f11..779b9e4 100644 --- a/build.zig +++ b/build.zig @@ -386,7 +386,7 @@ const ZiglingStep = struct { var zig_args = std.ArrayList([]const u8).init(b.allocator); defer zig_args.deinit(); - zig_args.append(b.zig_exe) catch @panic("OOM"); + zig_args.append(b.graph.zig_exe) catch @panic("OOM"); const cmd = switch (self.exercise.kind) { .exe => "build-exe", diff --git a/test/tests.zig b/test/tests.zig index 0a19277..9ab15b3 100644 --- a/test/tests.zig +++ b/test/tests.zig @@ -33,7 +33,7 @@ pub fn addCliTests(b: *std.Build, exercises: []const Exercise) *Step { const n = ex.number(); const cmd = b.addSystemCommand(&.{ - b.zig_exe, + b.graph.zig_exe, "build", "-Dhealed", b.fmt("-Dhealed-path={s}", .{tmp_path}), @@ -69,7 +69,7 @@ pub fn addCliTests(b: *std.Build, exercises: []const Exercise) *Step { // TODO: when an exercise is modified, the cache is not invalidated. const cmd = b.addSystemCommand(&.{ - b.zig_exe, + b.graph.zig_exe, "build", "-Dhealed", b.fmt("-Dhealed-path={s}", .{tmp_path}), @@ -99,7 +99,7 @@ pub fn addCliTests(b: *std.Build, exercises: []const Exercise) *Step { const n = ex.number(); const cmd = b.addSystemCommand(&.{ - b.zig_exe, + b.graph.zig_exe, "build", b.fmt("-Dn={}", .{n}), });