diff options
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 17 |
1 files changed, 16 insertions, 1 deletions
| @@ -16,10 +16,24 @@ pub fn build(b: *std.Build) void { | |||
| 16 | const gbp_gen_out = run_gbp_gen_exe.addOutputFileArg("gbp.bin.z"); | 16 | const gbp_gen_out = run_gbp_gen_exe.addOutputFileArg("gbp.bin.z"); |
| 17 | 17 | ||
| 18 | // Display width | 18 | // Display width |
| 19 | const cjk = b.option(bool, "cjk", "Ambiguouse code points are wide (display width: 2).") orelse false; | 19 | const cjk = b.option(bool, "cjk", "Ambiguous code points are wide (display width: 2).") orelse false; |
| 20 | const options = b.addOptions(); | 20 | const options = b.addOptions(); |
| 21 | options.addOption(bool, "cjk", cjk); | 21 | options.addOption(bool, "cjk", cjk); |
| 22 | 22 | ||
| 23 | // Visible Controls | ||
| 24 | const c0_width = b.option( | ||
| 25 | i4, | ||
| 26 | "c0_width", | ||
| 27 | "C0 controls have this width (default: 0, <BS> <Del> default -1)", | ||
| 28 | ); | ||
| 29 | options.addOption(?i4, "c0_width", c0_width); | ||
| 30 | const c1_width = b.option( | ||
| 31 | i4, | ||
| 32 | "c1_width", | ||
| 33 | "C1 controls have this width (default: 0)", | ||
| 34 | ); | ||
| 35 | options.addOption(?i4, "c1_width", c1_width); | ||
| 36 | |||
| 23 | const dwp_gen_exe = b.addExecutable(.{ | 37 | const dwp_gen_exe = b.addExecutable(.{ |
| 24 | .name = "dwp", | 38 | .name = "dwp", |
| 25 | .root_source_file = b.path("codegen/dwp.zig"), | 39 | .root_source_file = b.path("codegen/dwp.zig"), |
| @@ -210,6 +224,7 @@ pub fn build(b: *std.Build) void { | |||
| 210 | display_width.addImport("code_point", code_point); | 224 | display_width.addImport("code_point", code_point); |
| 211 | display_width.addImport("grapheme", grapheme); | 225 | display_width.addImport("grapheme", grapheme); |
| 212 | display_width.addImport("DisplayWidthData", width_data); | 226 | display_width.addImport("DisplayWidthData", width_data); |
| 227 | display_width.addOptions("options", options); // For testing | ||
| 213 | 228 | ||
| 214 | // Normalization | 229 | // Normalization |
| 215 | const ccc_data = b.createModule(.{ | 230 | const ccc_data = b.createModule(.{ |