build: libghostty-vt now depends on uucode directly

This doesn't add any real weight to it, we only need it for a type
definition. This fixes our example builds.
This commit is contained in:
Mitchell Hashimoto
2026-01-20 10:17:24 -08:00
parent 1c2c61bc3b
commit cb25c0a8ae
2 changed files with 21 additions and 8 deletions

View File

@@ -73,6 +73,9 @@ fn initVt(
// We always need unicode tables
deps.unicode_tables.addModuleImport(vt);
// We need uucode for grapheme break support
deps.addUucode(b, vt, cfg.target, cfg.optimize);
// If SIMD is enabled, add all our SIMD dependencies.
if (cfg.simd) {
try SharedDeps.addSimd(b, vt, null);

View File

@@ -412,14 +412,7 @@ pub fn add(
})) |dep| {
step.root_module.addImport("z2d", dep.module("z2d"));
}
if (b.lazyDependency("uucode", .{
.target = target,
.optimize = optimize,
.tables_path = self.uucode_tables,
.build_config_path = b.path("src/build/uucode_config.zig"),
})) |dep| {
step.root_module.addImport("uucode", dep.module("uucode"));
}
self.addUucode(b, step.root_module, target, optimize);
if (b.lazyDependency("zf", .{
.target = target,
.optimize = optimize,
@@ -878,6 +871,23 @@ pub fn gtkNgDistResources(
};
}
pub fn addUucode(
self: *const SharedDeps,
b: *std.Build,
module: *std.Build.Module,
target: std.Build.ResolvedTarget,
optimize: std.builtin.OptimizeMode,
) void {
if (b.lazyDependency("uucode", .{
.target = target,
.optimize = optimize,
.tables_path = self.uucode_tables,
.build_config_path = b.path("src/build/uucode_config.zig"),
})) |dep| {
module.addImport("uucode", dep.module("uucode"));
}
}
// 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.