pub fn path(b: *Build, sub_path: []const u8) LazyPath b: *Buildsub_path: []const u81539
1540
1541
1542
1543
1544
1545
1546
1547pub fn path(b: *Build, sub_path: []const u8) LazyPath {
if (fs.path.isAbsolute(sub_path)) {
panic("sub_path is expected to be relative to the build root, but was this absolute path: {q}. Absolute paths can cause problems but can be created via Graph.cwdRelativePath", .{sub_path});
}
return .{ .src_path = .{
.owner = b,
.sub_path = sub_path,
} };
}
References a file or directory relative to the source root.