diff options
| author | mlugg <mlugg@mlugg.co.uk> | 2024-02-04 17:46:04 +0000 |
|---|---|---|
| committer | mlugg <mlugg@mlugg.co.uk> | 2024-02-04 19:17:20 +0000 |
| commit | 0784d389844a127248bb724352ce7101bc49784c (patch) | |
| tree | 731c64a78aa6118823bb3579c679fea5a31b5900 /src/Module.zig | |
| parent | 0d8207c29236bf731f7d3bad189beb3a1e1b1d0c (diff) | |
| download | zig-0784d389844a127248bb724352ce7101bc49784c.tar.gz zig-0784d389844a127248bb724352ce7101bc49784c.zip | |
compiler: lock incremental dependency tracking behind --debug-incremental
This logic (currently) has a non-trivial cost (particularly in terms of
peak RSS) for tracking dependencies. Until incremental compilation is in
use in the wild, it doesn't make sense for users to pay that cost.
Diffstat (limited to 'src/Module.zig')
| -rw-r--r-- | src/Module.zig | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Module.zig b/src/Module.zig index f6f660e70e..df3a999fc0 100644 --- a/src/Module.zig +++ b/src/Module.zig @@ -3139,6 +3139,8 @@ fn markDeclDependenciesPotentiallyOutdated(zcu: *Zcu, decl_index: Decl.Index) !v } pub fn findOutdatedToAnalyze(zcu: *Zcu) Allocator.Error!?InternPool.Depender { + if (!zcu.comp.debug_incremental) return null; + if (zcu.outdated.count() == 0 and zcu.potentially_outdated.count() == 0) { log.debug("findOutdatedToAnalyze: no outdated depender", .{}); return null; |
