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.
This commit is contained in:
mlugg 2024-08-17 10:18:54 +01:00 committed by Jacob Young
parent 04b13547e1
commit d63d9b9918

View File

@ -3257,9 +3257,12 @@ fn buildOutputType(
else => false,
};
const incremental = opt_incremental orelse false;
const disable_lld_caching = !output_to_cache;
const cache_mode: Compilation.CacheMode = b: {
if (incremental) break :b .incremental;
if (disable_lld_caching) break :b .incremental;
if (!create_module.resolved_options.have_zcu) break :b .whole;
@ -3272,8 +3275,6 @@ fn buildOutputType(
break :b .incremental;
};
const incremental = opt_incremental orelse false;
process.raiseFileDescriptorLimit();
var file_system_inputs: std.ArrayListUnmanaged(u8) = .{};