std.Build: start using the cache system with RunStep
* Use std.Build.Cache.Directory instead of a string for storing the cache roots and build roots. * Set up a std.Build.Cache in build_runner.zig and use it in std.Build.RunStep for avoiding redundant work.
This commit is contained in:
@@ -208,9 +208,7 @@ fn make(step: *Step) !void {
|
||||
.{std.fmt.fmtSliceHexLower(&digest)},
|
||||
) catch unreachable;
|
||||
|
||||
const output_dir = try std.fs.path.join(gpa, &[_][]const u8{
|
||||
self.builder.cache_root, "o", &hash_basename,
|
||||
});
|
||||
const output_dir = try self.builder.cache_root.join(gpa, &.{ "o", &hash_basename });
|
||||
|
||||
// If output_path has directory parts, deal with them. Example:
|
||||
// output_dir is zig-cache/o/HASH
|
||||
|
||||
Reference in New Issue
Block a user