authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-12-30 21:01:20-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-01-02 13:16:17-07:00
log208a6c7d6a58c1fc46ed832acaa8a882f1c6a1dd
tree1a3e0df78c6d3beefe0d721cbc065f2e025b1f11
parent0ad2a99675d331c686847a7b2a84feddfcce6573

stage2: fix not calling deinit() on whole_cache_manifest

Need to mark it as "needing cleanup" a bit earlier in the function.

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

src/Compilation.zig+1-2
...@@ -1926,6 +1926,7 @@ pub fn update(comp: *Compilation) !void {...@@ -1926,6 +1926,7 @@ pub fn update(comp: *Compilation) !void {
1926 // We are about to obtain this lock, so here we give other processes a chance first.1926 // We are about to obtain this lock, so here we give other processes a chance first.
1927 comp.bin_file.releaseLock();1927 comp.bin_file.releaseLock();
19281928
1929 comp.whole_cache_manifest = &man;
1929 man = comp.cache_parent.obtain();1930 man = comp.cache_parent.obtain();
1930 try comp.addNonIncrementalStuffToCacheManifest(&man);1931 try comp.addNonIncrementalStuffToCacheManifest(&man);
19311932
...@@ -1960,8 +1961,6 @@ pub fn update(comp: *Compilation) !void {...@@ -1960,8 +1961,6 @@ pub fn update(comp: *Compilation) !void {
1960 }1961 }
1961 log.debug("CacheMode.whole cache miss for {s}", .{comp.bin_file.options.root_name});1962 log.debug("CacheMode.whole cache miss for {s}", .{comp.bin_file.options.root_name});
19621963
1963 comp.whole_cache_manifest = &man;
1964
1965 // Initialize `bin_file.emit` with a temporary Directory so that compilation can1964 // Initialize `bin_file.emit` with a temporary Directory so that compilation can
1966 // continue on the same path as incremental, using the temporary Directory.1965 // continue on the same path as incremental, using the temporary Directory.
1967 tmp_artifact_directory = d: {1966 tmp_artifact_directory = d: {