Merge pull request #1593 from jcollie/log-build-info-2

log more information about the build
This commit is contained in:
Mitchell Hashimoto
2024-03-26 09:47:49 -07:00
committed by GitHub
2 changed files with 8 additions and 0 deletions

View File

@ -83,6 +83,13 @@ pub const BuildConfig = struct {
pub const version = options.app_version;
pub const version_string = options.app_version_string;
/// The optimization mode as a string.
pub const mode_string = mode: {
const m = @tagName(builtin.mode);
if (std.mem.lastIndexOfScalar(u8, m, '.')) |i| break :mode m[i..];
break :mode m;
};
/// The artifact we're producing. This can be used to determine if we're
/// building a standalone exe, an embedded lib, etc.
pub const artifact = Artifact.detect();

View File

@ -252,6 +252,7 @@ pub const GlobalState = struct {
// Output some debug information right away
std.log.info("ghostty version={s}", .{build_config.version_string});
std.log.info("ghostty build optimize={s}", .{build_config.mode_string});
std.log.info("runtime={}", .{build_config.app_runtime});
std.log.info("font_backend={}", .{build_config.font_backend});
std.log.info("dependency harfbuzz={s}", .{harfbuzz.versionString()});