authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-02-17 02:44:16-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-02-26 10:33:17-08:00
logd51aa9748f9e4e3616328a207a8047ff37d81f8b
tree6f517deb55ab4059c8dd10d3618ac2e2c87019b5
parent031f23117dadd84b1e7189ee5b0f712eeb23ca1e

change default WASI stack size

to match the other operating systems. 16 MiB closes #18885

4 files changed, 10 insertions(+), 16 deletions(-)

lib/std/compress/flate.zig+3-3
......@@ -79,9 +79,9 @@ const fixedBufferStream = std.io.fixedBufferStream;
7979const print = std.debug.print;
8080const builtin = @import("builtin");
8181
82test "flate" {
83 _ = @import("flate/deflate.zig");
84 _ = @import("flate/inflate.zig");
82test {
83 _ = deflate;
84 _ = inflate;
8585}
8686
8787test "flate compress/decompress" {
lib/std/compress/flate/deflate.zig+3-7
......@@ -530,9 +530,7 @@ fn SimpleCompressor(
530530
531531const builtin = @import("builtin");
532532
533test "flate.Deflate tokenization" {
534 if (builtin.target.cpu.arch == .wasm32) return error.SkipZigTest;
535
533test "tokenization" {
536534 const L = Token.initLiteral;
537535 const M = Token.initMatch;
538536
......@@ -607,9 +605,7 @@ const TestTokenWriter = struct {
607605 pub fn flush(_: *Self) !void {}
608606};
609607
610test "flate deflate file tokenization" {
611 if (builtin.target.cpu.arch == .wasm32) return error.SkipZigTest;
612
608test "file tokenization" {
613609 const levels = [_]Level{ .level_4, .level_5, .level_6, .level_7, .level_8, .level_9 };
614610 const cases = [_]struct {
615611 data: []const u8, // uncompressed content
......@@ -718,7 +714,7 @@ fn TokenDecoder(comptime WriterType: type) type {
718714 };
719715}
720716
721test "flate.Deflate store simple compressor" {
717test "store simple compressor" {
722718 const data = "Hello world!";
723719 const expected = [_]u8{
724720 0x1, // block type 0, final bit set
src/link/Wasm.zig+4-1
......@@ -418,7 +418,10 @@ pub fn createEmpty(
418418 .zcu_object_sub_path = zcu_object_sub_path,
419419 .gc_sections = options.gc_sections orelse (output_mode != .Obj),
420420 .print_gc_sections = options.print_gc_sections,
421 .stack_size = options.stack_size orelse std.wasm.page_size * 16, // 1MB
421 .stack_size = options.stack_size orelse switch (target.os.tag) {
422 .freestanding => 1 * 1024 * 1024, // 1 MiB
423 else => 16 * 1024 * 1024, // 16 MiB
424 },
422425 .allow_shlib_undefined = options.allow_shlib_undefined orelse false,
423426 .file = null,
424427 .disable_lld_caching = options.disable_lld_caching,
test/tests.zig-5
......@@ -1138,11 +1138,6 @@ pub fn addModuleTests(b: *std.Build, options: ModuleTestOptions) *Step {
11381138
11391139 for (options.include_paths) |include_path| these_tests.addIncludePath(.{ .path = include_path });
11401140
1141 if (target.os.tag == .wasi) {
1142 // WASI's default stack size can be too small for some big tests.
1143 these_tests.stack_size = 2 * 1024 * 1024;
1144 }
1145
11461141 const qualified_name = b.fmt("{s}-{s}-{s}-{s}{s}{s}{s}{s}{s}", .{
11471142 options.name,
11481143 triple_txt,