diff options
| author | Can Celik <ogulcancelik@gmail.com> | 2026-09-10 21:51:57 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-10 21:51:57 +0300 |
| commit | 425c86179791cd32e2d4ce0ae7f269940b4b0663 (patch) | |
| tree | e52c4383a6d69216cbe2a32638bf90841d7e2189 /vendor/libghostty-vt/pkg/highway | |
| parent | 90e947a6e26e02f10ec7f1694c4eb5b78a86406b (diff) | |
chore: upgrade libghostty and preserve terminal behavior (#3906)
Diffstat (limited to 'vendor/libghostty-vt/pkg/highway')
| -rw-r--r-- | vendor/libghostty-vt/pkg/highway/build.zig | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/vendor/libghostty-vt/pkg/highway/build.zig b/vendor/libghostty-vt/pkg/highway/build.zig index a0244728..af3300eb 100644 --- a/vendor/libghostty-vt/pkg/highway/build.zig +++ b/vendor/libghostty-vt/pkg/highway/build.zig @@ -18,17 +18,16 @@ pub fn build(b: *std.Build) !void { .root_source_file = b.path("src/detect.zig"), .target = target, .optimize = optimize, + // Our highway package is free of libc at runtime (uses no symbols) + // but does require libc headers at compile time. + .link_libc = true, }), .linkage = .static, }); - // Our highway package is free of libc at runtime (uses no symbols) - // but does require libc headers at compile time. - lib.linkLibC(); - - lib.addIncludePath(b.path("src/cpp")); + lib.root_module.addIncludePath(b.path("src/cpp")); if (upstream_) |upstream| { - lib.addIncludePath(upstream.path("")); + lib.root_module.addIncludePath(upstream.path("")); module.addIncludePath(upstream.path("")); } @@ -100,9 +99,16 @@ pub fn build(b: *std.Build) !void { "-fmath-errno", "-fno-exceptions", }); + } else if (target.result.abi == .msvc) { + try flags.appendSlice(b.allocator, &.{ + // -fno-autolink also drops UCRT's /alternatename fallback. + "-D_Avx2WmemEnabledWeakValue=_Avx2WmemEnabled", + "-fno-autolink", + "-fno-stack-protector", + }); } - lib.addCSourceFiles(.{ .flags = flags.items, .files = &.{ + lib.root_module.addCSourceFiles(.{ .flags = flags.items, .files = &.{ "src/cpp/abort.cc", "src/cpp/per_target.cc", "src/cpp/targets.cpp", @@ -127,7 +133,7 @@ pub fn build(b: *std.Build) !void { .optimize = optimize, }), }); - test_exe.linkLibrary(lib); + test_exe.root_module.linkLibrary(lib); var it = module.import_table.iterator(); while (it.next()) |entry| test_exe.root_module.addImport(entry.key_ptr.*, entry.value_ptr.*); |
