Fix C include files not being in whole cache (#11365)
This commit is contained in:
@@ -3855,6 +3855,8 @@ pub fn semaFile(mod: *Module, file: *File) SemaError!void {
|
||||
});
|
||||
errdefer gpa.free(resolved_path);
|
||||
|
||||
mod.comp.whole_cache_manifest_mutex.lock();
|
||||
defer mod.comp.whole_cache_manifest_mutex.unlock();
|
||||
try man.addFilePostContents(resolved_path, source.bytes, source.stat);
|
||||
}
|
||||
} else {
|
||||
@@ -4336,6 +4338,8 @@ pub fn embedFile(mod: *Module, cur_file: *File, rel_file_path: []const u8) !*Emb
|
||||
if (mod.comp.whole_cache_manifest) |man| {
|
||||
const copied_resolved_path = try gpa.dupe(u8, resolved_path);
|
||||
errdefer gpa.free(copied_resolved_path);
|
||||
mod.comp.whole_cache_manifest_mutex.lock();
|
||||
defer mod.comp.whole_cache_manifest_mutex.unlock();
|
||||
try man.addFilePostContents(copied_resolved_path, bytes, stat);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user