commit fed031031dc671f961b5f1f04cffd1ea4753f3ba (tree)
parent b069a2eb21d4bdcbc87c566be013fa30f26d3a1e
Author: Andrew Kelley <andrew@ziglang.org>
Date: Sat, 23 May 2026 14:16:44 -0700
Maker: fix compilation on windows
Diffstat:
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/lib/compiler/Maker/Step/FindProgram.zig b/lib/compiler/Maker/Step/FindProgram.zig
@@ -93,7 +93,7 @@ fn checkCandidate(
while (it.next()) |ext| {
if (!supportedWindowsProgramExtension(ext)) continue;
- const extended_path = try std.mem.concat(arena, &.{ full_path, ext });
+ const extended_path = try std.mem.concat(arena, u8, &.{ full_path, ext });
if (Io.Dir.cwd().access(io, extended_path, .{ .execute = true })) |_| {
maker.generatedPath(found_path).* = .initCwd(extended_path);
diff --git a/lib/compiler/Maker/Watch.zig b/lib/compiler/Maker/Watch.zig
@@ -548,9 +548,11 @@ const Os = switch (builtin.os.tag) {
}
fn update(w: *Watch, steps: []const Configuration.Step.Index) !void {
- const gpa = w.maker.gpa;
+ const maker = w.maker;
+ const gpa = maker.gpa;
// Add missing marks and note persisted ones.
- for (steps) |step| {
+ for (steps) |step_index| {
+ const step = maker.stepByIndex(step_index);
for (step.inputs.table.keys(), step.inputs.table.values()) |path, *files| {
const dir = dir: {
const gop = try w.dir_table.getOrPut(gpa, path);
@@ -579,7 +581,7 @@ const Os = switch (builtin.os.tag) {
for (files.items) |basename| {
const gop = try dir.reaction_set.getOrPut(gpa, basename);
if (!gop.found_existing) gop.value_ptr.* = .{};
- try gop.value_ptr.put(gpa, step, w.generation);
+ try gop.value_ptr.put(gpa, step_index, w.generation);
}
}
}