From 6a837e64cf70651bfa16e0d6090ffb4122a2f76f Mon Sep 17 00:00:00 2001 From: mlugg Date: Fri, 10 Jan 2025 05:35:03 +0000 Subject: [PATCH] compiler: bump stack size 32 MiB -> 46 MiB Before the prior commit, the maximum comptime recursion depth on my system was 4062. After the prior commit, it decreased to 2854. This commit increases the compiler's stack size enough so that the recursion depth limit is no less than it was before the `Sema.analyzeCall` rewrite, preventing this from being a breaking change. Specifically, this stack size increases my observed maximum comptime recursion depth to 4105. --- build.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.zig b/build.zig index d79a785c76..656ec27bfc 100644 --- a/build.zig +++ b/build.zig @@ -11,7 +11,7 @@ const assert = std.debug.assert; const DevEnv = @import("src/dev.zig").Env; const zig_version: std.SemanticVersion = .{ .major = 0, .minor = 14, .patch = 0 }; -const stack_size = 32 * 1024 * 1024; +const stack_size = 46 * 1024 * 1024; pub fn build(b: *std.Build) !void { const only_c = b.option(bool, "only-c", "Translate the Zig compiler to C code, with only the C backend enabled") orelse false;