mirror of
https://github.com/ziglang/zig.git
synced 2024-11-30 00:52:52 +00:00
build.zig: 32 MiB stack size
This gives more headroom for comptime recursion, especially for debug builds of Zig.
This commit is contained in:
parent
644baa0f5b
commit
b946934576
@ -11,6 +11,7 @@ const InstallDirectoryOptions = std.build.InstallDirectoryOptions;
|
||||
const assert = std.debug.assert;
|
||||
|
||||
const zig_version = std.builtin.Version{ .major = 0, .minor = 10, .patch = 0 };
|
||||
const stack_size = 32 * 1024 * 1024;
|
||||
|
||||
pub fn build(b: *Builder) !void {
|
||||
b.setPreferredReleaseMode(.ReleaseFast);
|
||||
@ -41,6 +42,7 @@ pub fn build(b: *Builder) !void {
|
||||
const toolchain_step = b.step("test-toolchain", "Run the tests for the toolchain");
|
||||
|
||||
var test_cases = b.addTest("src/test.zig");
|
||||
test_cases.stack_size = stack_size;
|
||||
test_cases.setBuildMode(mode);
|
||||
test_cases.addPackagePath("test_cases", "test/cases.zig");
|
||||
test_cases.single_threaded = single_threaded;
|
||||
@ -141,6 +143,7 @@ pub fn build(b: *Builder) !void {
|
||||
};
|
||||
|
||||
const exe = b.addExecutable("zig", main_file);
|
||||
exe.stack_size = stack_size;
|
||||
exe.strip = strip;
|
||||
exe.build_id = b.option(bool, "build-id", "Include a build id note") orelse false;
|
||||
exe.install();
|
||||
|
@ -7,7 +7,7 @@ export fn entry() usize { return @sizeOf(@TypeOf(&seventh_fib_number)); }
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=x86_64-linux
|
||||
// target=native
|
||||
//
|
||||
// :3:21: error: evaluation exceeded 1000 backwards branches
|
||||
// :3:21: note: use @setEvalBranchQuota() to raise the branch limit from 1000
|
||||
|
Loading…
Reference in New Issue
Block a user