authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2022-05-07 01:52:00+02:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2022-05-07 01:52:00+02:00
logefeb031b7917f552ea73ee59c086e3d75c87cbaf
treefea8964d0f06e5bfb699547c1cd9e2daa307fb35
parenta2dbe6589ee6f33bb796ea3fd88b0bda5915e58e

macho: skip cache if cache_mode is .whole


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

src/link/MachO.zig+4-2
...@@ -519,7 +519,8 @@ pub fn flushModule(self: *MachO, comp: *Compilation, prog_node: *std.Progress.No...@@ -519,7 +519,8 @@ pub fn flushModule(self: *MachO, comp: *Compilation, prog_node: *std.Progress.No
519 var needs_full_relink = true;519 var needs_full_relink = true;
520520
521 cache: {521 cache: {
522 if (use_stage1 and self.base.options.disable_lld_caching) break :cache;522 if ((use_stage1 and self.base.options.disable_lld_caching) or self.base.options.cache_mode == .whole)
523 break :cache;
523524
524 man = comp.cache_parent.obtain();525 man = comp.cache_parent.obtain();
525526
...@@ -1099,7 +1100,8 @@ pub fn flushModule(self: *MachO, comp: *Compilation, prog_node: *std.Progress.No...@@ -1099,7 +1100,8 @@ pub fn flushModule(self: *MachO, comp: *Compilation, prog_node: *std.Progress.No
1099 }1100 }
11001101
1101 cache: {1102 cache: {
1102 if (use_stage1 and self.base.options.disable_lld_caching) break :cache;1103 if ((use_stage1 and self.base.options.disable_lld_caching) or self.base.options.cache_mode == .whole)
1104 break :cache;
1103 // Update the file with the digest. If it fails we can continue; it only1105 // Update the file with the digest. If it fails we can continue; it only
1104 // means that the next invocation will have an unnecessary cache miss.1106 // means that the next invocation will have an unnecessary cache miss.
1105 Cache.writeSmallFile(cache_dir_handle, id_symlink_basename, &digest) catch |err| {1107 Cache.writeSmallFile(cache_dir_handle, id_symlink_basename, &digest) catch |err| {