diff --git a/build.zig b/build.zig index f621cf4e0..0f9168267 100644 --- a/build.zig +++ b/build.zig @@ -73,6 +73,7 @@ fn addLinkerFlags( ) !void { const webui_target = webui.rootModuleTarget(); const is_windows = webui_target.os.tag == .windows; + const debug = webui.root_module.optimize.? == .Debug; const debug = webui.root_module.optimize.? == .Debug; @@ -86,6 +87,9 @@ fn addLinkerFlags( "-Wno-error=date-time", }; + if (debug) { + webui.root_module.addCMacro("WEBUI_LOG", ""); + } webui.addCSourceFile(.{ .file = b.path("src/webui.c"), .flags = if (enable_tls) tls_flags else no_tls_flags,