summaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
authorGravatar Jose Colon Rodriguez2024-02-26 20:22:41 -0400
committerGravatar Jose Colon Rodriguez2024-02-26 20:22:41 -0400
commitad306724ae574b1a22abbcb6de37e65a69db82e4 (patch)
tree4b78d89006a2524b63c0ca7530e4c56a111d6eca /build.zig
parentUsing NormData nfc and nfd (diff)
downloadzg-ad306724ae574b1a22abbcb6de37e65a69db82e4.tar.gz
zg-ad306724ae574b1a22abbcb6de37e65a69db82e4.tar.xz
zg-ad306724ae574b1a22abbcb6de37e65a69db82e4.zip
Using NormData nfkd
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig27
1 files changed, 22 insertions, 5 deletions
diff --git a/build.zig b/build.zig
index 2c3ccdc..fa3660e 100644
--- a/build.zig
+++ b/build.zig
@@ -43,6 +43,15 @@ pub fn build(b: *std.Build) void {
43 const run_canon_gen_exe = b.addRunArtifact(canon_gen_exe); 43 const run_canon_gen_exe = b.addRunArtifact(canon_gen_exe);
44 const canon_gen_out = run_canon_gen_exe.addOutputFileArg("canon.bin.z"); 44 const canon_gen_out = run_canon_gen_exe.addOutputFileArg("canon.bin.z");
45 45
46 const compat_gen_exe = b.addExecutable(.{
47 .name = "compat",
48 .root_source_file = .{ .path = "codegen/compat.zig" },
49 .target = b.host,
50 .optimize = .Debug,
51 });
52 const run_compat_gen_exe = b.addRunArtifact(compat_gen_exe);
53 const compat_gen_out = run_compat_gen_exe.addOutputFileArg("compat.bin.z");
54
46 const ccc_gen_exe = b.addExecutable(.{ 55 const ccc_gen_exe = b.addExecutable(.{
47 .name = "ccc", 56 .name = "ccc",
48 .root_source_file = .{ .path = "codegen/ccc.zig" }, 57 .root_source_file = .{ .path = "codegen/ccc.zig" },
@@ -85,7 +94,7 @@ pub fn build(b: *std.Build) void {
85 94
86 // Fixed pitch font display width 95 // Fixed pitch font display width
87 const dw_data = b.createModule(.{ 96 const dw_data = b.createModule(.{
88 .root_source_file = .{ .path = "src/DisplayWidthData.zig" }, 97 .root_source_file = .{ .path = "src/WidthData.zig" },
89 .target = target, 98 .target = target,
90 .optimize = optimize, 99 .optimize = optimize,
91 }); 100 });
@@ -104,26 +113,34 @@ pub fn build(b: *std.Build) void {
104 113
105 // Normalization 114 // Normalization
106 const ccc_data = b.createModule(.{ 115 const ccc_data = b.createModule(.{
107 .root_source_file = .{ .path = "src/CombiningClassData.zig" }, 116 .root_source_file = .{ .path = "src/CombiningData.zig" },
108 .target = target, 117 .target = target,
109 .optimize = optimize, 118 .optimize = optimize,
110 }); 119 });
111 ccc_data.addAnonymousImport("ccc", .{ .root_source_file = ccc_gen_out }); 120 ccc_data.addAnonymousImport("ccc", .{ .root_source_file = ccc_gen_out });
112 121
113 const canon_data = b.createModule(.{ 122 const canon_data = b.createModule(.{
114 .root_source_file = .{ .path = "src/Canonical.zig" }, 123 .root_source_file = .{ .path = "src/CanonData.zig" },
115 .target = target, 124 .target = target,
116 .optimize = optimize, 125 .optimize = optimize,
117 }); 126 });
118 canon_data.addAnonymousImport("canon", .{ .root_source_file = canon_gen_out }); 127 canon_data.addAnonymousImport("canon", .{ .root_source_file = canon_gen_out });
119 128
129 const compat_data = b.createModule(.{
130 .root_source_file = .{ .path = "src/CompatData.zig" },
131 .target = target,
132 .optimize = optimize,
133 });
134 compat_data.addAnonymousImport("compat", .{ .root_source_file = compat_gen_out });
135
120 const norm_data = b.createModule(.{ 136 const norm_data = b.createModule(.{
121 .root_source_file = .{ .path = "src/NormData.zig" }, 137 .root_source_file = .{ .path = "src/NormData.zig" },
122 .target = target, 138 .target = target,
123 .optimize = optimize, 139 .optimize = optimize,
124 }); 140 });
125 norm_data.addImport("CanonicalData", canon_data); 141 norm_data.addImport("CanonData", canon_data);
126 norm_data.addImport("CombiningClassData", ccc_data); 142 norm_data.addImport("CompatData", compat_data);
143 norm_data.addImport("CombiningData", ccc_data);
127 144
128 const norm = b.addModule("Normalizer", .{ 145 const norm = b.addModule("Normalizer", .{
129 .root_source_file = .{ .path = "src/Normalizer.zig" }, 146 .root_source_file = .{ .path = "src/Normalizer.zig" },