From d39a834f4ecb9abbeca33b8f99d4eb9f7d93e2d2 Mon Sep 17 00:00:00 2001 From: Pascal Zittlau Date: Fri, 24 Oct 2025 14:20:51 +0200 Subject: [PATCH] remove explicit comptime because of miscompilation --- src/root.zig | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/root.zig b/src/root.zig index 77f77fc..e11d483 100644 --- a/src/root.zig +++ b/src/root.zig @@ -71,19 +71,18 @@ fn intersect(comptime as: []const @Type(.enum_literal), comptime bs: []const @Ty /// Checks whether the log is enabled for a specific combination of `tags`. Depends on the `options` /// set. pub fn logEnabled(comptime tags: []const @Type(.enum_literal)) bool { - comptime { - // If `tags` has at least one in `options.tags_disabled` then we never log. - if (options.tags_disabled.len > 0) { - if (intersect(tags, options.tags_disabled)) { - return false; - } - } - - // If `tags` has at least one in `options.tags_enabled` then we should log. - if (options.tags_enabled.len > 0) { - return intersect(tags, options.tags_enabled); + // If `tags` has at least one in `options.tags_disabled` then we never log. + if (options.tags_disabled.len > 0) { + if (intersect(tags, options.tags_disabled)) { + return false; } } + + // If `tags` has at least one in `options.tags_enabled` then we should log. + if (options.tags_enabled.len > 0) { + return intersect(tags, options.tags_enabled); + } + // If neither is set then we just log everything. return true; }