aboutsummaryrefslogtreecommitdiff
path: root/vendor/libghostty-vt/src/build/GhosttyExe.zig
diff options
context:
space:
mode:
authorCan Celik <ogulcancelik@gmail.com>2026-09-10 21:51:57 +0300
committerGitHub <noreply@github.com>2026-09-10 21:51:57 +0300
commit425c86179791cd32e2d4ce0ae7f269940b4b0663 (patch)
treee52c4383a6d69216cbe2a32638bf90841d7e2189 /vendor/libghostty-vt/src/build/GhosttyExe.zig
parent90e947a6e26e02f10ec7f1694c4eb5b78a86406b (diff)
chore: upgrade libghostty and preserve terminal behavior (#3906)
Diffstat (limited to 'vendor/libghostty-vt/src/build/GhosttyExe.zig')
-rw-r--r--vendor/libghostty-vt/src/build/GhosttyExe.zig17
1 files changed, 5 insertions, 12 deletions
diff --git a/vendor/libghostty-vt/src/build/GhosttyExe.zig b/vendor/libghostty-vt/src/build/GhosttyExe.zig
index caa564bf..22f39b7b 100644
--- a/vendor/libghostty-vt/src/build/GhosttyExe.zig
+++ b/vendor/libghostty-vt/src/build/GhosttyExe.zig
@@ -18,7 +18,7 @@ pub fn init(b: *std.Build, cfg: *const Config, deps: *const SharedDeps) !Ghostty
.target = cfg.target,
.optimize = cfg.optimize,
.strip = cfg.strip,
- .omit_frame_pointer = cfg.strip,
+ .omit_frame_pointer = cfg.omitFramePointer(),
.unwind_tables = if (cfg.strip) .none else .sync,
}),
// Crashes on x86_64 self-hosted on 0.15.1
@@ -36,21 +36,14 @@ pub fn init(b: *std.Build, cfg: *const Config, deps: *const SharedDeps) !Ghostty
// Check for possible issues
try checkNixShell(exe, cfg);
- // Patch our rpath if that option is specified.
- if (cfg.patch_rpath) |rpath| {
- if (rpath.len > 0) {
- const run = std.Build.Step.Run.create(b, "patchelf rpath");
- run.addArgs(&.{ "patchelf", "--set-rpath", rpath });
- run.addArtifactArg(exe);
- install_step.step.dependOn(&run.step);
- }
- }
+ // Add patchelf step if that option is specified.
+ cfg.addPatchElf(exe, &install_step.step);
// OS-specific
switch (cfg.target.result.os.tag) {
.windows => {
exe.subsystem = .Windows;
- exe.addWin32ResourceFile(.{
+ exe.root_module.addWin32ResourceFile(.{
.file = b.path("dist/windows/ghostty.rc"),
});
},
@@ -85,7 +78,7 @@ fn checkNixShell(exe: *std.Build.Step.Compile, cfg: *const Config) !void {
if (!cfg.target.query.isNativeOs()) return;
// Verify we're in NixOS
- std.fs.accessAbsolute("/etc/NIXOS", .{}) catch return;
+ std.Io.Dir.accessAbsolute(exe.step.owner.graph.io, "/etc/NIXOS", .{}) catch return;
// If we're in a nix shell, not a problem
if (cfg.env.get("IN_NIX_SHELL") != null) return;