From c91c4dc25696224fd1d15d5b5fbf9698c8a77272 Mon Sep 17 00:00:00 2001 From: LemonBoy Date: Fri, 13 Nov 2020 20:54:05 +0100 Subject: stage2: Create cache manifest before calling final If we enter the `if` because `comp.disable_c_depfile` is false the `man` object has no manifest and calling .final on it will trip an assertion. Closes #7096 --- src/Compilation.zig | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/Compilation.zig') diff --git a/src/Compilation.zig b/src/Compilation.zig index 91a1915029..8b80e61662 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -1818,6 +1818,9 @@ fn updateCObject(comp: *Compilation, c_object: *CObject, c_comp_progress_node: * }; } + // We don't actually care whether it's a cache hit or miss; we just need the digest and the lock. + if (comp.disable_c_depfile) _ = try man.hit(); + // Rename into place. const digest = man.final(); const o_sub_path = try std.fs.path.join(arena, &[_][]const u8{ "o", &digest }); -- cgit v1.2.3