diff options
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -644,7 +644,9 @@ pub fn build(b: *std.Build) void { gm.linkLibrary(freetype_dep.artifact("freetype")); // HarfBuzz from source, like FreeType: its FreeType integration // (HAVE_FREETYPE, hb-ft) links the freetype artifact above, so the two - // share one FreeType. The flags are the ones Ghostty builds it with. + // share one FreeType. The flags are the ones Ghostty builds it with, + // plus its allocator: gui.zig's ui_malloc and friends, over a Zig + // allocator, as FreeType's is. if (b.lazyDependency("harfbuzz", .{})) |upstream| { const harfbuzz = b.addLibrary(.{ .name = "harfbuzz", @@ -670,6 +672,10 @@ pub fn build(b: *std.Build) void { "-DHAVE_FT_SET_VAR_BLEND_COORDINATES=1", "-DHAVE_FT_DONE_MM_VAR=1", "-DHAVE_FT_GET_TRANSFORM=1", + "-Dhb_malloc_impl=ui_malloc", + "-Dhb_calloc_impl=ui_calloc", + "-Dhb_realloc_impl=ui_realloc", + "-Dhb_free_impl=ui_free", }, }); gm.linkLibrary(harfbuzz); |
