From 2704b54bc58f8913aeecaf6d2fe25b22378957b5 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 9 Aug 2023 15:18:22 -0700 Subject: [PATCH] warn if the binary is a debug build --- src/main.zig | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main.zig b/src/main.zig index 8356f27b2..03603392d 100644 --- a/src/main.zig +++ b/src/main.zig @@ -22,6 +22,12 @@ const Ghostty = @import("main_c.zig").Ghostty; pub var state: GlobalState = undefined; pub fn main() !void { + if (comptime builtin.mode == .Debug) { + std.log.warn("This is a debug build. Performance will be very poor.", .{}); + std.log.warn("You should only use a debug build for developing Ghostty.", .{}); + std.log.warn("Otherwise, please rebuild in a release mode.", .{}); + } + state.init(); defer state.deinit(); const alloc = state.alloc;