diff --git a/lib/std/Build.zig b/lib/std/Build.zig index 548f951991..9b394f60f3 100644 --- a/lib/std/Build.zig +++ b/lib/std/Build.zig @@ -2524,7 +2524,10 @@ pub const LazyPath = union(enum) { .up = gen.up, .sub_path = dupePathInner(allocator, gen.sub_path), } }, - .dependency => |dep| .{ .dependency = dep }, + .dependency => |dep| .{ .dependency = .{ + .dependency = dep.dependency, + .sub_path = dupePathInner(allocator, dep.sub_path), + } }, }; } };