aboutsummaryrefslogtreecommitdiff
path: root/src/Compilation.zig
diff options
context:
space:
mode:
authormlugg <mlugg@mlugg.co.uk>2024-02-04 17:46:04 +0000
committermlugg <mlugg@mlugg.co.uk>2024-02-04 19:17:20 +0000
commit0784d389844a127248bb724352ce7101bc49784c (patch)
tree731c64a78aa6118823bb3579c679fea5a31b5900 /src/Compilation.zig
parent0d8207c29236bf731f7d3bad189beb3a1e1b1d0c (diff)
downloadzig-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/Compilation.zig')
-rw-r--r--src/Compilation.zig3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig
index 596b8d5667..1d83a7d3ec 100644
--- a/src/Compilation.zig
+++ b/src/Compilation.zig
@@ -156,6 +156,7 @@ time_report: bool,
stack_report: bool,
debug_compiler_runtime_libs: bool,
debug_compile_errors: bool,
+debug_incremental: bool,
job_queued_compiler_rt_lib: bool = false,
job_queued_compiler_rt_obj: bool = false,
job_queued_update_builtin_zig: bool,
@@ -1079,6 +1080,7 @@ pub const CreateOptions = struct {
verbose_llvm_cpu_features: bool = false,
debug_compiler_runtime_libs: bool = false,
debug_compile_errors: bool = false,
+ debug_incremental: bool = false,
/// Normally when you create a `Compilation`, Zig will automatically build
/// and link in required dependencies, such as compiler-rt and libc. When
/// building such dependencies themselves, this flag must be set to avoid
@@ -1508,6 +1510,7 @@ pub fn create(gpa: Allocator, arena: Allocator, options: CreateOptions) !*Compil
.test_name_prefix = options.test_name_prefix,
.debug_compiler_runtime_libs = options.debug_compiler_runtime_libs,
.debug_compile_errors = options.debug_compile_errors,
+ .debug_incremental = options.debug_incremental,
.libcxx_abi_version = options.libcxx_abi_version,
.root_name = root_name,
.sysroot = sysroot,