diff options
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 27 |
1 files changed, 27 insertions, 0 deletions
| @@ -22,6 +22,16 @@ pub fn build(b: *std.Build) void { | |||
| 22 | const run_gbp_gen_exe = b.addRunArtifact(gbp_gen_exe); | 22 | const run_gbp_gen_exe = b.addRunArtifact(gbp_gen_exe); |
| 23 | const gbp_gen_out = run_gbp_gen_exe.addOutputFileArg("gbp.bin.z"); | 23 | const gbp_gen_out = run_gbp_gen_exe.addOutputFileArg("gbp.bin.z"); |
| 24 | 24 | ||
| 25 | // Emoji | ||
| 26 | const emoji_gen_exe = b.addExecutable(.{ | ||
| 27 | .name = "emoji", | ||
| 28 | .root_source_file = b.path("codegen/emoji.zig"), | ||
| 29 | .target = b.graph.host, | ||
| 30 | .optimize = .Debug, | ||
| 31 | }); | ||
| 32 | const run_emoji_gen_exe = b.addRunArtifact(emoji_gen_exe); | ||
| 33 | const emoji_gen_out = run_emoji_gen_exe.addOutputFileArg("emoji.bin.z"); | ||
| 34 | |||
| 25 | // Display width | 35 | // Display width |
| 26 | const cjk = b.option(bool, "cjk", "Ambiguous code points are wide (display width: 2).") orelse false; | 36 | const cjk = b.option(bool, "cjk", "Ambiguous code points are wide (display width: 2).") orelse false; |
| 27 | const options = b.addOptions(); | 37 | const options = b.addOptions(); |
| @@ -215,6 +225,22 @@ pub fn build(b: *std.Build) void { | |||
| 215 | }); | 225 | }); |
| 216 | const grapheme_tr = b.addRunArtifact(grapheme_t); | 226 | const grapheme_tr = b.addRunArtifact(grapheme_t); |
| 217 | 227 | ||
| 228 | // Emoji module | ||
| 229 | const emoji = b.addModule("Emoji", .{ | ||
| 230 | .root_source_file = b.path("src/Emoji.zig"), | ||
| 231 | .target = target, | ||
| 232 | .optimize = optimize, | ||
| 233 | }); | ||
| 234 | emoji.addAnonymousImport("emoji", .{ .root_source_file = emoji_gen_out }); | ||
| 235 | |||
| 236 | const emoji_t = b.addTest(.{ | ||
| 237 | .name = "Emoji", | ||
| 238 | .root_module = emoji, | ||
| 239 | .target = target, | ||
| 240 | .optimize = optimize, | ||
| 241 | }); | ||
| 242 | const emoji_tr = b.addRunArtifact(emoji_t); | ||
| 243 | |||
| 218 | // ASCII utilities | 244 | // ASCII utilities |
| 219 | const ascii = b.addModule("ascii", .{ | 245 | const ascii = b.addModule("ascii", .{ |
| 220 | .root_source_file = b.path("src/ascii.zig"), | 246 | .root_source_file = b.path("src/ascii.zig"), |
| @@ -452,6 +478,7 @@ pub fn build(b: *std.Build) void { | |||
| 452 | test_step.dependOn(&code_point_tr.step); | 478 | test_step.dependOn(&code_point_tr.step); |
| 453 | test_step.dependOn(&display_width_tr.step); | 479 | test_step.dependOn(&display_width_tr.step); |
| 454 | test_step.dependOn(&grapheme_tr.step); | 480 | test_step.dependOn(&grapheme_tr.step); |
| 481 | test_step.dependOn(&emoji_tr.step); | ||
| 455 | test_step.dependOn(&ascii_tr.step); | 482 | test_step.dependOn(&ascii_tr.step); |
| 456 | test_step.dependOn(&ccc_data_tr.step); | 483 | test_step.dependOn(&ccc_data_tr.step); |
| 457 | test_step.dependOn(&canon_data_tr.step); | 484 | test_step.dependOn(&canon_data_tr.step); |