Skip to content

Commit

Permalink
handle std.Build.LazyPath.generated_dirname in build runner
Browse files Browse the repository at this point in the history
  • Loading branch information
Techatrix committed Jan 5, 2024
1 parent 7dd6ffd commit de59f0a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/build_runner/master.zig
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,14 @@ const copied_from_zig = struct {
return null;
}
},
.generated_dirname => |gen| {
var dirname = getPath(.{ .generated = gen.generated }, builder) orelse return null;
var i: usize = 0;
while (i <= gen.up) : (i += 1) {
dirname = std.fs.path.dirname(dirname) orelse return null;
}
return dirname;
},
.dependency => |dep| return dep.dependency.builder.pathJoin(&[_][]const u8{
dep.dependency.builder.build_root.path.?,
dep.sub_path,
Expand Down

0 comments on commit de59f0a

Please sign in to comment.