From ec3afc9c0f5ee6277c27ab5a8b5ef595fcdae104 Mon Sep 17 00:00:00 2001 From: BeanCheeseBurrito Date: Mon, 29 Jul 2024 04:55:33 -0700 Subject: [PATCH] Use FLECS_NDEBUG instead of NDEBUG --- src/Flecs.NET.Native/build.zig | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Flecs.NET.Native/build.zig b/src/Flecs.NET.Native/build.zig index 33e350d8..9b672992 100644 --- a/src/Flecs.NET.Native/build.zig +++ b/src/Flecs.NET.Native/build.zig @@ -22,8 +22,10 @@ pub fn compileFlecs(options: anytype, b: *Build, lib_type: LibType) void { lib.addCSourceFile(.{ .file = b.path("../../submodules/flecs/flecs.c"), .flags = &.{} }); lib.linkLibC(); - if (options.optimize != .Debug) { - lib.defineCMacro("NDEBUG", null); + if (options.optimize == .Debug) { + lib.defineCMacro("FLECS_DEBUG", null); + } else { + lib.defineCMacro("FLECS_NDEBUG", null); } if (options.soft_assert) {