authorgravatar for motiejus@jakstys.ltMotiejus Jakštys <motiejus@jakstys.lt> 2023-04-07 22:17:23+03:00
committergravatar for motiejus@jakstys.ltMotiejus Jakštys <motiejus@jakstys.lt> 2023-04-16 23:55:51+03:00
loge17c872ddaf527707fa91e16276ffc89d7a3be90
tree0ef26ba36559c8659525c02ee8175841632904ba
parent7abc3738a2f0e024bee12e2046054a62fb8aa3e0

build.zig: default to Debug for wasm32 too

Following @Luukdegram's comment[1]: > The default should remain Debug when unspecified. In ReleaseSmall the > user would lose all DWARF support when testing their WebAssembly code. > Building a release version should be opt-in, not the default. [1]: https://github.com/ziglang/zig/pull/15192#discussion_r1160824726

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

build.zig+1-3
......@@ -22,9 +22,7 @@ pub fn build(b: *std.Build) !void {
2222 break :t b.standardTargetOptions(.{ .default_target = default_target });
2323 };
2424
25 // TODO remove type annotation with ziglang/zig#13749
26 const optimize: std.builtin.Mode = b.option(std.builtin.Mode, "optimize", "Prioritize performance, safety, or binary size (-O flag)") orelse
27 if (target.getCpuArch() == .wasm32) .ReleaseSmall else .Debug;
25 const optimize = b.standardOptimizeOption(.{});
2826
2927 const single_threaded = b.option(bool, "single-threaded", "Build artifacts that run in single threaded mode");
3028 const use_zig_libcxx = b.option(bool, "use-zig-libcxx", "If libc++ is needed, use zig's bundled version, don't try to integrate with the system") orelse false;