authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-03-03 17:29:20-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-03-15 10:48:13-07:00
log2cc33f5f4e0b55dcc1fb7cc4fb5d3b565b3a50d2
tree7b0b52a58a8daa640079c9ab5f14bbeeaf97d19c
parent2996eb558756c697e2ccfe9691356e536c88916b

std.Build.Step.cacheHit marks step as cached on hit


1 files changed, 2 insertions(+), 1 deletions(-)

lib/std/Build/Step.zig+2-1
...@@ -415,7 +415,8 @@ pub fn allocPrintCmd(arena: Allocator, opt_cwd: ?[]const u8, argv: []const []con...@@ -415,7 +415,8 @@ pub fn allocPrintCmd(arena: Allocator, opt_cwd: ?[]const u8, argv: []const []con
415}415}
416416
417pub fn cacheHit(s: *Step, man: *std.Build.Cache.Manifest) !bool {417pub fn cacheHit(s: *Step, man: *std.Build.Cache.Manifest) !bool {
418 return man.hit() catch |err| return failWithCacheError(s, man, err);418 s.result_cached = man.hit() catch |err| return failWithCacheError(s, man, err);
419 return s.result_cached;
419}420}
420421
421fn failWithCacheError(s: *Step, man: *const std.Build.Cache.Manifest, err: anyerror) anyerror {422fn failWithCacheError(s: *Step, man: *const std.Build.Cache.Manifest, err: anyerror) anyerror {