| ... | @@ -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; |
| 520 | | 520 | |
| 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; |
| 523 | | 524 | |
| 524 | man = comp.cache_parent.obtain(); | 525 | man = comp.cache_parent.obtain(); |
| 525 | | 526 | |
| ... | @@ -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 | } |
| 1100 | | 1101 | |
| 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 only | 1105 | // 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| { |