Skip to content

Commit

Permalink
build: use build_root instead of cwd when generating defs
Browse files Browse the repository at this point in the history
  • Loading branch information
Vexu committed Nov 3, 2023
1 parent 45eb8a7 commit 9f4c28a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build/GenerateDef.zig
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void {
// non-backwards-compatible way.
man.hash.add(@as(u32, 0xDCC14144));

const contents = try std.fs.cwd().readFileAlloc(arena, self.path, std.math.maxInt(u32));
const contents = try b.build_root.handle.readFileAlloc(arena, self.path, std.math.maxInt(u32));
man.hash.addBytes(contents);

const out_name = b.fmt("{s}.zig", .{std.fs.path.stem(self.path)});
Expand Down

0 comments on commit 9f4c28a

Please sign in to comment.