Skip to content

Commit 58c0078

Browse files
committed
Add optimizations flag and remove content from zon
1 parent ab50362 commit 58c0078

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

build.zig

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,14 @@ pub const EmccFlags = std.StringHashMap(void);
8585

8686
pub fn emccDefaultFlags(allocator: std.mem.Allocator, optimize: std.builtin.OptimizeMode) EmccFlags {
8787
var args = EmccFlags.init(allocator);
88-
if (optimize == .Debug) {
89-
args.put("-Og", {}) catch unreachable;
90-
args.put("-gsource-map", {}) catch unreachable;
88+
switch (optimize) {
89+
.Debug => {
90+
args.put("-gsource-map", {}) catch unreachable;
91+
},
92+
.ReleaseSmall, .ReleaseFast => {
93+
args.put("-O3", {}) catch unreachable;
94+
},
95+
else => {},
9196
}
9297
return args;
9398
}

build.zig.zon

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"build.zig",
66
"build.zig.zon",
77
"src",
8-
"content",
98
"LICENSE",
109
"README.md",
1110
},

0 commit comments

Comments
 (0)