diff options
| author | mlugg <mlugg@mlugg.co.uk> | 2024-08-17 10:18:54 +0100 |
|---|---|---|
| committer | Jacob Young <jacobly0@users.noreply.github.com> | 2024-08-17 18:50:10 -0400 |
| commit | d63d9b99185c080c6ed7a6be3dc43c897f2aeadc (patch) | |
| tree | 26230f76729b652fce6d4e19c3bcfbb206ee2428 /src/main.zig | |
| parent | 04b13547e13e3410b911fdbb06cbb27b5051cfbf (diff) | |
| download | zig-d63d9b99185c080c6ed7a6be3dc43c897f2aeadc.tar.gz zig-d63d9b99185c080c6ed7a6be3dc43c897f2aeadc.zip | |
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.
Diffstat (limited to 'src/main.zig')
| -rw-r--r-- | src/main.zig | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.zig b/src/main.zig index 62c721f157..3429500bf8 100644 --- a/src/main.zig +++ b/src/main.zig @@ -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) = .{}; |
