From 9f4c28ae36b664238ce8e4ac1d0e7fd147d16726 Mon Sep 17 00:00:00 2001 From: Veikka Tuominen Date: Fri, 3 Nov 2023 19:47:05 +0200 Subject: [PATCH] build: use `build_root` instead of `cwd` when generating defs --- build/GenerateDef.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/GenerateDef.zig b/build/GenerateDef.zig index 193db5ac..0814e64c 100644 --- a/build/GenerateDef.zig +++ b/build/GenerateDef.zig @@ -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)});