From efeb031b7917f552ea73ee59c086e3d75c87cbaf Mon Sep 17 00:00:00 2001 From: Jakub Konka Date: Sat, 7 May 2022 01:52:00 +0200 Subject: [PATCH] macho: skip cache if cache_mode is .whole --- src/link/MachO.zig | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/link/MachO.zig b/src/link/MachO.zig index 4b804e6fcb..fa110f28cc 100644 --- a/src/link/MachO.zig +++ b/src/link/MachO.zig @@ -519,7 +519,8 @@ pub fn flushModule(self: *MachO, comp: *Compilation, prog_node: *std.Progress.No var needs_full_relink = true; cache: { - if (use_stage1 and self.base.options.disable_lld_caching) break :cache; + if ((use_stage1 and self.base.options.disable_lld_caching) or self.base.options.cache_mode == .whole) + break :cache; man = comp.cache_parent.obtain(); @@ -1099,7 +1100,8 @@ pub fn flushModule(self: *MachO, comp: *Compilation, prog_node: *std.Progress.No } cache: { - if (use_stage1 and self.base.options.disable_lld_caching) break :cache; + if ((use_stage1 and self.base.options.disable_lld_caching) or self.base.options.cache_mode == .whole) + break :cache; // Update the file with the digest. If it fails we can continue; it only // means that the next invocation will have an unnecessary cache miss. Cache.writeSmallFile(cache_dir_handle, id_symlink_basename, &digest) catch |err| {