mach: add centralized is_debug flag

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2024-06-16 09:47:16 -07:00
parent b72f0e11b6
commit 316f2354d1
4 changed files with 12 additions and 5 deletions

View file

@ -50,6 +50,8 @@ pub const Entities = @import("module/main.zig").Entities;
pub const use_sysgpu = if (@hasDecl(@import("root"), "use_sysgpu")) @import("root").use_sysgpu else false;
pub const gpu = if (use_sysgpu) sysgpu.sysgpu else wgpu;
pub const is_debug = builtin.mode == .Debug;
test {
const std = @import("std");
// TODO: refactor code so we can use this here: