compiler: default to .whole cache mode for self-hosted backends

This is a better default cache mode until incremental compilation is
enabled by default.
This commit is contained in:
mlugg 2025-02-23 01:17:23 +00:00 committed by Jacob Young
parent 0367d684fc
commit c2983a3f88

View File

@ -3470,7 +3470,11 @@ fn buildOutputType(
// incremental cache mode is used for LLVM backend too. // incremental cache mode is used for LLVM backend too.
if (create_module.resolved_options.use_llvm) break :b .whole; if (create_module.resolved_options.use_llvm) break :b .whole;
break :b .incremental; // Eventually, this default should be `.incremental`. However, since incremental
// compilation is currently an opt-in feature, it makes a strictly worse default cache mode
// than `.whole`.
// https://github.com/ziglang/zig/issues/21165
break :b .whole;
}; };
process.raiseFileDescriptorLimit(); process.raiseFileDescriptorLimit();