diff options
| author | 2024-03-01 18:51:43 -0400 | |
|---|---|---|
| committer | 2024-03-01 18:51:43 -0400 | |
| commit | 9a0fb96c0c28540493a205b85d1b89d2c9b50f2b (patch) | |
| tree | 723760b45ef8ef604b235d10c3c60edfadd0bb70 /build.zig | |
| parent | Removed dupe tombstone check in Normalizer (diff) | |
| download | zg-9a0fb96c0c28540493a205b85d1b89d2c9b50f2b.tar.gz zg-9a0fb96c0c28540493a205b85d1b89d2c9b50f2b.tar.xz zg-9a0fb96c0c28540493a205b85d1b89d2c9b50f2b.zip | |
Normalizer.eqlIgnoreCase compatibility caseless matching
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 20 |
1 files changed, 19 insertions, 1 deletions
| @@ -88,6 +88,15 @@ pub fn build(b: *std.Build) void { | |||
| 88 | const run_gencat_gen_exe = b.addRunArtifact(gencat_gen_exe); | 88 | const run_gencat_gen_exe = b.addRunArtifact(gencat_gen_exe); |
| 89 | const gencat_gen_out = run_gencat_gen_exe.addOutputFileArg("gencat.bin.z"); | 89 | const gencat_gen_out = run_gencat_gen_exe.addOutputFileArg("gencat.bin.z"); |
| 90 | 90 | ||
| 91 | const fold_gen_exe = b.addExecutable(.{ | ||
| 92 | .name = "fold", | ||
| 93 | .root_source_file = .{ .path = "codegen/fold.zig" }, | ||
| 94 | .target = b.host, | ||
| 95 | .optimize = .Debug, | ||
| 96 | }); | ||
| 97 | const run_fold_gen_exe = b.addRunArtifact(fold_gen_exe); | ||
| 98 | const fold_gen_out = run_fold_gen_exe.addOutputFileArg("fold.bin.z"); | ||
| 99 | |||
| 91 | // Modules we provide | 100 | // Modules we provide |
| 92 | // Code points | 101 | // Code points |
| 93 | const code_point = b.addModule("code_point", .{ | 102 | const code_point = b.addModule("code_point", .{ |
| @@ -174,6 +183,14 @@ pub fn build(b: *std.Build) void { | |||
| 174 | }); | 183 | }); |
| 175 | normp_data.addAnonymousImport("normp", .{ .root_source_file = normp_gen_out }); | 184 | normp_data.addAnonymousImport("normp", .{ .root_source_file = normp_gen_out }); |
| 176 | 185 | ||
| 186 | // Case folding | ||
| 187 | const fold_data = b.createModule(.{ | ||
| 188 | .root_source_file = .{ .path = "src/FoldData.zig" }, | ||
| 189 | .target = target, | ||
| 190 | .optimize = optimize, | ||
| 191 | }); | ||
| 192 | fold_data.addAnonymousImport("fold", .{ .root_source_file = fold_gen_out }); | ||
| 193 | |||
| 177 | const norm_data = b.createModule(.{ | 194 | const norm_data = b.createModule(.{ |
| 178 | .root_source_file = .{ .path = "src/NormData.zig" }, | 195 | .root_source_file = .{ .path = "src/NormData.zig" }, |
| 179 | .target = target, | 196 | .target = target, |
| @@ -184,6 +201,7 @@ pub fn build(b: *std.Build) void { | |||
| 184 | norm_data.addImport("CompatData", compat_data); | 201 | norm_data.addImport("CompatData", compat_data); |
| 185 | norm_data.addImport("HangulData", hangul_data); | 202 | norm_data.addImport("HangulData", hangul_data); |
| 186 | norm_data.addImport("NormPropsData", normp_data); | 203 | norm_data.addImport("NormPropsData", normp_data); |
| 204 | norm_data.addImport("FoldData", fold_data); | ||
| 187 | 205 | ||
| 188 | const norm = b.addModule("Normalizer", .{ | 206 | const norm = b.addModule("Normalizer", .{ |
| 189 | .root_source_file = .{ .path = "src/Normalizer.zig" }, | 207 | .root_source_file = .{ .path = "src/Normalizer.zig" }, |
| @@ -195,7 +213,7 @@ pub fn build(b: *std.Build) void { | |||
| 195 | norm.addImport("NormData", norm_data); | 213 | norm.addImport("NormData", norm_data); |
| 196 | 214 | ||
| 197 | // General Category | 215 | // General Category |
| 198 | const gencat_data = b.createModule(.{ | 216 | const gencat_data = b.addModule("GenCatData", .{ |
| 199 | .root_source_file = .{ .path = "src/GenCatData.zig" }, | 217 | .root_source_file = .{ .path = "src/GenCatData.zig" }, |
| 200 | .target = target, | 218 | .target = target, |
| 201 | .optimize = optimize, | 219 | .optimize = optimize, |