From a44283b04d1ec0dee6544533d5a60a7e560634e9 Mon Sep 17 00:00:00 2001 From: John <117967760+mochalins@users.noreply.github.com> Date: Tue, 19 Nov 2024 23:30:30 +0900 Subject: [PATCH] scm: Print webui logs in debug mode (#527) --- build.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build.zig b/build.zig index f621cf4e0..51733ff71 100644 --- a/build.zig +++ b/build.zig @@ -73,7 +73,6 @@ fn addLinkerFlags( ) !void { const webui_target = webui.rootModuleTarget(); const is_windows = webui_target.os.tag == .windows; - const debug = webui.root_module.optimize.? == .Debug; // Prepare compiler flags. @@ -86,6 +85,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,