Skip to content

Commit

Permalink
Merge pull request #91 from chip2n/master
Browse files Browse the repository at this point in the history
Add NDEBUG flag to non-debug builds
  • Loading branch information
floooh authored Jan 18, 2025
2 parents 423d38e + 0d25caf commit 29c59b1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ pub fn buildLibSokol(b: *Build, options: LibSokolOptions) !*Build.Step.Compile {
// resolve .auto backend into specific backend by platform
var cflags = try std.BoundedArray([]const u8, 64).init(0);
try cflags.append("-DIMPL");
if (options.optimize != .Debug) {
try cflags.append("-DNDEBUG");
}
const backend = resolveSokolBackend(options.backend, lib.rootModuleTarget());
switch (backend) {
.d3d11 => try cflags.append("-DSOKOL_D3D11"),
Expand Down

0 comments on commit 29c59b1

Please sign in to comment.