commit 523cfabcdff65c9547299b3a4f721d2052c163ee (tree)
parent b4e21ccb4994d051ecf086491e42f57ce183d9b9
Author: Andrew Kelley <andrew@ziglang.org>
Date: Fri, 27 Mar 2026 04:43:55 -0700
build.zig: hard cap on compiler max_rss at 8G
This number should never be raised. If the value is exceeded, then it is
considered a bug in the Zig project that building the compiler takes
more than 8G of memory.
Partial revert of 1293f080fdfc74966b541b44f0a907561df3d617
Deprioritizes #31510
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/build.zig b/build.zig
@@ -772,7 +772,10 @@ fn addCompilerMod(b: *std.Build, options: AddCompilerModOptions) *std.Build.Modu
fn addCompilerStep(b: *std.Build, options: AddCompilerModOptions) *std.Build.Step.Compile {
const exe = b.addExecutable(.{
.name = "zig",
- .max_rss = 8_700_000_000,
+ // This number should never be raised. If the value is exceeded, then
+ // it is considered a bug in the Zig project that building the
+ // compiler takes more than 8G of memory.
+ .max_rss = 8_000_000_000,
.root_module = addCompilerMod(b, options),
});
exe.stack_size = stack_size;