authorgravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2025-01-10 05:35:03+00:00
committergravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2025-01-10 05:41:21+00:00
log6a837e64cf70651bfa16e0d6090ffb4122a2f76f
tree1d344d3bdeb485e43903a4b42e82f92e1836d395
parente9bd2d45d4bbaf7eff7e95bc3ef7a0123b66a103
signaturelock-open Commit is signed but in an unrecognized format.

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.

1 files changed, 1 insertions(+), 1 deletions(-)

build.zig+1-1
...@@ -11,7 +11,7 @@ const assert = std.debug.assert;...@@ -11,7 +11,7 @@ const assert = std.debug.assert;
11const DevEnv = @import("src/dev.zig").Env;11const DevEnv = @import("src/dev.zig").Env;
1212
13const zig_version: std.SemanticVersion = .{ .major = 0, .minor = 14, .patch = 0 };13const zig_version: std.SemanticVersion = .{ .major = 0, .minor = 14, .patch = 0 };
14const stack_size = 32 * 1024 * 1024;14const stack_size = 46 * 1024 * 1024;
1515
16pub fn build(b: *std.Build) !void {16pub fn build(b: *std.Build) !void {
17 const only_c = b.option(bool, "only-c", "Translate the Zig compiler to C code, with only the C backend enabled") orelse false;17 const only_c = b.option(bool, "only-c", "Translate the Zig compiler to C code, with only the C backend enabled") orelse false;