aboutsummaryrefslogtreecommitdiff
path: root/vendor/libghostty-vt/pkg/libxml2
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/pkg/libxml2
parent90e947a6e26e02f10ec7f1694c4eb5b78a86406b (diff)
chore: upgrade libghostty and preserve terminal behavior (#3906)
Diffstat (limited to 'vendor/libghostty-vt/pkg/libxml2')
-rw-r--r--vendor/libghostty-vt/pkg/libxml2/build.zig21
1 files changed, 14 insertions, 7 deletions
diff --git a/vendor/libghostty-vt/pkg/libxml2/build.zig b/vendor/libghostty-vt/pkg/libxml2/build.zig
index a9b3e4b1..07a45e94 100644
--- a/vendor/libghostty-vt/pkg/libxml2/build.zig
+++ b/vendor/libghostty-vt/pkg/libxml2/build.zig
@@ -11,18 +11,25 @@ pub fn build(b: *std.Build) !void {
.root_module = b.createModule(.{
.target = target,
.optimize = optimize,
+ .link_libc = true,
}),
.linkage = .static,
});
- lib.linkLibC();
- if (upstream_) |upstream| lib.addIncludePath(upstream.path("include"));
- lib.addIncludePath(b.path("override/include"));
+ if (upstream_) |upstream| lib.root_module.addIncludePath(upstream.path("include"));
+ lib.root_module.addIncludePath(b.path("override/include"));
if (target.result.os.tag == .windows) {
- lib.addIncludePath(b.path("override/config/win32"));
- lib.linkSystemLibrary("ws2_32");
+ lib.root_module.addIncludePath(b.path("override/config/win32"));
+ // For dynamic linking, we prefer dynamic linking and to search by
+ // mode first. Mode first will search all paths for a dynamic library
+ // before falling back to static.
+ const dynamic_link_opts: std.Build.Module.LinkSystemLibraryOptions = .{
+ .preferred_link_mode = .dynamic,
+ .search_strategy = .mode_first,
+ };
+ lib.root_module.linkSystemLibrary("ws2_32", dynamic_link_opts);
} else {
- lib.addIncludePath(b.path("override/config/posix"));
+ lib.root_module.addIncludePath(b.path("override/config/posix"));
}
var flags: std.ArrayList([]const u8) = .empty;
@@ -98,7 +105,7 @@ pub fn build(b: *std.Build) !void {
}
if (upstream_) |upstream| {
- lib.addCSourceFiles(.{
+ lib.root_module.addCSourceFiles(.{
.root = upstream.path(""),
.files = srcs,
.flags = flags.items,