From c2983a3f88411c1c9c20582c43054c07cbbd88b3 Mon Sep 17 00:00:00 2001 From: mlugg Date: Sun, 23 Feb 2025 01:17:23 +0000 Subject: [PATCH] compiler: default to `.whole` cache mode for self-hosted backends This is a better default cache mode until incremental compilation is enabled by default. --- src/main.zig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main.zig b/src/main.zig index 7b1bc50bd6..2e9d204420 100644 --- a/src/main.zig +++ b/src/main.zig @@ -3470,7 +3470,11 @@ fn buildOutputType( // incremental cache mode is used for LLVM backend too. 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();