diff --git a/lib/std/compress/flate.zig b/lib/std/compress/flate.zig index 1c6964eac1..5338328a21 100644 --- a/lib/std/compress/flate.zig +++ b/lib/std/compress/flate.zig @@ -79,9 +79,9 @@ const fixedBufferStream = std.io.fixedBufferStream; const print = std.debug.print; const builtin = @import("builtin"); -test "flate" { - _ = @import("flate/deflate.zig"); - _ = @import("flate/inflate.zig"); +test { + _ = deflate; + _ = inflate; } test "flate compress/decompress" { diff --git a/lib/std/compress/flate/deflate.zig b/lib/std/compress/flate/deflate.zig index 0ca998d8eb..794ab02247 100644 --- a/lib/std/compress/flate/deflate.zig +++ b/lib/std/compress/flate/deflate.zig @@ -530,9 +530,7 @@ fn SimpleCompressor( const builtin = @import("builtin"); -test "flate.Deflate tokenization" { - if (builtin.target.cpu.arch == .wasm32) return error.SkipZigTest; - +test "tokenization" { const L = Token.initLiteral; const M = Token.initMatch; @@ -607,9 +605,7 @@ const TestTokenWriter = struct { pub fn flush(_: *Self) !void {} }; -test "flate deflate file tokenization" { - if (builtin.target.cpu.arch == .wasm32) return error.SkipZigTest; - +test "file tokenization" { const levels = [_]Level{ .level_4, .level_5, .level_6, .level_7, .level_8, .level_9 }; const cases = [_]struct { data: []const u8, // uncompressed content @@ -718,7 +714,7 @@ fn TokenDecoder(comptime WriterType: type) type { }; } -test "flate.Deflate store simple compressor" { +test "store simple compressor" { const data = "Hello world!"; const expected = [_]u8{ 0x1, // block type 0, final bit set diff --git a/src/link/Wasm.zig b/src/link/Wasm.zig index f4bc2f8f0f..455dfa79c6 100644 --- a/src/link/Wasm.zig +++ b/src/link/Wasm.zig @@ -418,7 +418,10 @@ pub fn createEmpty( .zcu_object_sub_path = zcu_object_sub_path, .gc_sections = options.gc_sections orelse (output_mode != .Obj), .print_gc_sections = options.print_gc_sections, - .stack_size = options.stack_size orelse std.wasm.page_size * 16, // 1MB + .stack_size = options.stack_size orelse switch (target.os.tag) { + .freestanding => 1 * 1024 * 1024, // 1 MiB + else => 16 * 1024 * 1024, // 16 MiB + }, .allow_shlib_undefined = options.allow_shlib_undefined orelse false, .file = null, .disable_lld_caching = options.disable_lld_caching, diff --git a/test/tests.zig b/test/tests.zig index e1ec5db610..cbee78b2bd 100644 --- a/test/tests.zig +++ b/test/tests.zig @@ -1138,11 +1138,6 @@ pub fn addModuleTests(b: *std.Build, options: ModuleTestOptions) *Step { for (options.include_paths) |include_path| these_tests.addIncludePath(.{ .path = include_path }); - if (target.os.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}{s}{s}{s}", .{ options.name, triple_txt,