pub fn dependOnDirectory(b: *Build, lazy_path: LazyPath) void 2649
2650
2651
2652
2653
2654
2655
2656pub fn dependOnDirectory(b: *Build, lazy_path: LazyPath) void {
validateConfigureDependency(lazy_path);
const graph = b.graph;
graph.configure_dependencies.append(graph.arena, .{
.lazy_path = lazy_path.dupe(graph),
.mode = .directory,
}) catch @panic("OOM");
}
Indicates that the build.zig logic depends on a particular directory's entries.
This is an alternative to
Graph.poisonCachethat avoids making every invocation ofzig buildinto a cache miss.If any file is created, deleted, or renamed in this directory, the configure phase will be repeated.
Only a subset of
LazyPathare supported:If the directory would be inside one of the search prefixes, then the dependency cannot be tracked;
Graph.poisonCachemust be used instead.