From 70855b3290419ad38d004f8e494a24e2d9f7982c Mon Sep 17 00:00:00 2001 From: T Date: Wed, 7 Jan 2026 23:08:56 -0700 Subject: [PATCH] build.zig: fix using as a dependency in other projects (#1505) --- build.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.zig b/build.zig index 7fe1fed9..0ad8c867 100644 --- a/build.zig +++ b/build.zig @@ -170,7 +170,8 @@ fn initLibConfig(b: *std.Build, target: std.Build.ResolvedTarget, lib: *Compile) pub fn build(b: *std.Build) !void { const io: Io = if (is_zig_16) b.graph.io else {}; - const cwd = if (is_zig_16) Dir.cwd() else std.fs.cwd(); + const root_path = b.pathFromRoot("."); + const cwd = try if (is_zig_16) Dir.cwd().openDir(io, root_path, .{}) else std.fs.cwd().openDir(root_path, .{}); const src_path = "src/libsodium"; const src_dir = if (is_zig_16)