From 3b0736fb89039f3cfea298a50edf71c3fe62bd3f Mon Sep 17 00:00:00 2001 From: mochalins <117967760+mochalins@users.noreply.github.com> Date: Thu, 10 Oct 2024 18:02:36 +0900 Subject: [PATCH] fix: Release mode building with Zig --- build.zig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build.zig b/build.zig index efca824a6..db43ffe19 100644 --- a/build.zig +++ b/build.zig @@ -68,9 +68,8 @@ fn addLinkerFlags(b: *Build, webui: *Compile, enable_tls: bool) !void { // Prepare compiler flags. const tls_flags = &[_][]const u8{ "-DWEBUI_TLS", "-DNO_SSL_DL", "-DOPENSSL_API_1_1" }; var civetweb_flags = std.ArrayList([]const u8).init(b.allocator); - try civetweb_flags.appendSlice(&[_][]const u8{ "-DNDEBUG", "-DNO_CACHING", "-DNO_CGI", "-DUSE_WEBSOCKET" }); + try civetweb_flags.appendSlice(&[_][]const u8{ "-DNDEBUG", "-DNO_CACHING", "-DNO_CGI", "-DUSE_WEBSOCKET", "-Wno-error=date-time" }); try civetweb_flags.appendSlice(if (enable_tls) tls_flags else &[_][]const u8{ "-DUSE_WEBSOCKET", "-DNO_SSL" }); - if (is_windows) try civetweb_flags.append("-DMUST_IMPLEMENT_CLOCK_GETTIME"); webui.addCSourceFile(.{ .file = if (zig_ver < 12) .{ .path = "src/webui.c" } else b.path("src/webui.c"),