authorgravatar for jacobly@ziglang.orgJacob Young <jacobly@ziglang.org> 2025-02-14 05:42:10-05:00
committergravatar for jacobly@ziglang.orgJacob Young <jacobly@ziglang.org> 2025-02-15 03:45:21-05:00
logf98f5a5f742d3fb4400d288b716feecfc26a8238
treedb4b3e5c042612c4a2b7b0728b5f9dfbc0175ef4
parent4ea18c22f958c05aa5c715fc8823d704699746ec

main: increase thread stack size for non-x86_64 backends

I observed a stack overflow during x86_64 CodeGen in a debug compiler compiled by the llvm backend. This happens while compiling `main.buildOutputType` due to the Air being nested almost 500 levels.

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

src/main.zig+1-4
...@@ -39,10 +39,7 @@ test {...@@ -39,10 +39,7 @@ test {
39 _ = Package;39 _ = Package;
40}40}
4141
42const thread_stack_size = switch (builtin.zig_backend) {42const thread_stack_size = 32 << 20;
43 else => std.Thread.SpawnConfig.default_stack_size,
44 .stage2_x86_64 => 32 << 20,
45};
4643
47pub const std_options: std.Options = .{44pub const std_options: std.Options = .{
48 .wasiCwd = wasi_cwd,45 .wasiCwd = wasi_cwd,