diff options
| author | mlugg <mlugg@mlugg.co.uk> | 2023-09-23 19:07:30 +0100 |
|---|---|---|
| committer | mlugg <mlugg@mlugg.co.uk> | 2023-09-23 22:01:08 +0100 |
| commit | 62d077cfa1ad5ebbf97ed91a71d5b88f9c313e9d (patch) | |
| tree | 06c2ffd8015e7846d257261e09f6808f20fee70f /test | |
| parent | 09a57583a4ccce30603ffc8d0e3d7359dc3cb978 (diff) | |
| download | zig-62d077cfa1ad5ebbf97ed91a71d5b88f9c313e9d.tar.gz zig-62d077cfa1ad5ebbf97ed91a71d5b88f9c313e9d.zip | |
tests: give explicit stack size to module tests on WASI
I have observed the standard library tests overflowing the default WASI
stack as of the previous commit. As best as I can tell, this isn't
directly our fault: LLVM is just emitting less efficient code in debug
builds with the new codegen patterns.
Diffstat (limited to 'test')
| -rw-r--r-- | test/tests.zig | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/tests.zig b/test/tests.zig index 6f863bae8d..03a5c67895 100644 --- a/test/tests.zig +++ b/test/tests.zig @@ -1034,6 +1034,11 @@ pub fn addModuleTests(b: *std.Build, options: ModuleTestOptions) *Step { these_tests.addIncludePath(.{ .path = "test" }); + if (test_target.target.getOs().tag == .wasi) { + // WASI's default stack size can be too small for some big tests. + these_tests.stack_size = 2 * 1024 * 1024; + } + const qualified_name = b.fmt("{s}-{s}-{s}{s}{s}{s}", .{ options.name, triple_txt, |
