authorgravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2024-08-17 10:18:54+01:00
committergravatar for jacobly@ziglang.orgJacob Young <jacobly@ziglang.org> 2024-08-17 18:50:10-04:00
logd63d9b99185c080c6ed7a6be3dc43c897f2aeadc
tree26230f76729b652fce6d4e19c3bcfbb206ee2428
parent04b13547e13e3410b911fdbb06cbb27b5051cfbf

compiler: use incremental cache mode with -fincremental

This results in correct reporting to the build system of file system inputs with `-fincremental --watch` on a `fno-emit-bin` build.

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

src/main.zig+3-2
......@@ -3257,9 +3257,12 @@ fn buildOutputType(
32573257 else => false,
32583258 };
32593259
3260 const incremental = opt_incremental orelse false;
3261
32603262 const disable_lld_caching = !output_to_cache;
32613263
32623264 const cache_mode: Compilation.CacheMode = b: {
3265 if (incremental) break :b .incremental;
32633266 if (disable_lld_caching) break :b .incremental;
32643267 if (!create_module.resolved_options.have_zcu) break :b .whole;
32653268
......@@ -3272,8 +3275,6 @@ fn buildOutputType(
32723275 break :b .incremental;
32733276 };
32743277
3275 const incremental = opt_incremental orelse false;
3276
32773278 process.raiseFileDescriptorLimit();
32783279
32793280 var file_system_inputs: std.ArrayListUnmanaged(u8) = .{};