diff options
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 209 |
1 files changed, 119 insertions, 90 deletions
| @@ -42,28 +42,40 @@ pub fn build(b: *std.Build) void { | |||
| 42 | // Grapheme break | 42 | // Grapheme break |
| 43 | const gbp_gen_exe = b.addExecutable(.{ | 43 | const gbp_gen_exe = b.addExecutable(.{ |
| 44 | .name = "gbp", | 44 | .name = "gbp", |
| 45 | .root_source_file = b.path("codegen/gbp.zig"), | 45 | .root_module = b.createModule(.{ |
| 46 | .target = b.graph.host, | 46 | .root_source_file = b.path("codegen/gbp.zig"), |
| 47 | .optimize = .Debug, | 47 | .target = b.graph.host, |
| 48 | }); | 48 | .optimize = .Debug, |
| 49 | }), | ||
| 50 | }); | ||
| 51 | gbp_gen_exe.root_module.addAnonymousImport("DerivedCoreProperties.txt", .{ .root_source_file = b.path("data/unicode/DerivedCoreProperties.txt") }); | ||
| 52 | gbp_gen_exe.root_module.addAnonymousImport("GraphemeBreakProperty.txt", .{ .root_source_file = b.path("data/unicode/auxiliary/GraphemeBreakProperty.txt") }); | ||
| 53 | gbp_gen_exe.root_module.addAnonymousImport("emoji-data.txt", .{ .root_source_file = b.path("data/unicode/emoji/emoji-data.txt") }); | ||
| 49 | const run_gbp_gen_exe = b.addRunArtifact(gbp_gen_exe); | 54 | const run_gbp_gen_exe = b.addRunArtifact(gbp_gen_exe); |
| 50 | const gbp_gen_out = run_gbp_gen_exe.addOutputFileArg("gbp.bin.z"); | 55 | const gbp_gen_out = run_gbp_gen_exe.addOutputFileArg("gbp.bin.z"); |
| 51 | 56 | ||
| 52 | const wbp_gen_exe = b.addExecutable(.{ | 57 | const wbp_gen_exe = b.addExecutable(.{ |
| 53 | .name = "wbp", | 58 | .name = "wbp", |
| 54 | .root_source_file = b.path("codegen/wbp.zig"), | 59 | .root_module = b.createModule(.{ |
| 55 | .target = b.graph.host, | 60 | .root_source_file = b.path("codegen/wbp.zig"), |
| 56 | .optimize = .Debug, | 61 | .target = b.graph.host, |
| 62 | .optimize = .Debug, | ||
| 63 | }), | ||
| 57 | }); | 64 | }); |
| 65 | wbp_gen_exe.root_module.addAnonymousImport("WordBreakProperty.txt", .{ .root_source_file = b.path("data/unicode/auxiliary/WordBreakProperty.txt") }); | ||
| 58 | const run_wbp_gen_exe = b.addRunArtifact(wbp_gen_exe); | 66 | const run_wbp_gen_exe = b.addRunArtifact(wbp_gen_exe); |
| 59 | const wbp_gen_out = run_wbp_gen_exe.addOutputFileArg("wbp.bin.z"); | 67 | const wbp_gen_out = run_wbp_gen_exe.addOutputFileArg("wbp.bin.z"); |
| 60 | 68 | ||
| 61 | const dwp_gen_exe = b.addExecutable(.{ | 69 | const dwp_gen_exe = b.addExecutable(.{ |
| 62 | .name = "dwp", | 70 | .name = "dwp", |
| 63 | .root_source_file = b.path("codegen/dwp.zig"), | 71 | .root_module = b.createModule(.{ |
| 64 | .target = b.graph.host, | 72 | .root_source_file = b.path("codegen/dwp.zig"), |
| 65 | .optimize = .Debug, | 73 | .target = b.graph.host, |
| 66 | }); | 74 | .optimize = .Debug, |
| 75 | }), | ||
| 76 | }); | ||
| 77 | dwp_gen_exe.root_module.addAnonymousImport("DerivedEastAsianWidth.txt", .{ .root_source_file = b.path("data/unicode/extracted/DerivedEastAsianWidth.txt") }); | ||
| 78 | dwp_gen_exe.root_module.addAnonymousImport("DerivedGeneralCategory.txt", .{ .root_source_file = b.path("data/unicode/extracted/DerivedGeneralCategory.txt") }); | ||
| 67 | dwp_gen_exe.root_module.addOptions("options", dwp_options); | 79 | dwp_gen_exe.root_module.addOptions("options", dwp_options); |
| 68 | const run_dwp_gen_exe = b.addRunArtifact(dwp_gen_exe); | 80 | const run_dwp_gen_exe = b.addRunArtifact(dwp_gen_exe); |
| 69 | const dwp_gen_out = run_dwp_gen_exe.addOutputFileArg("dwp.bin.z"); | 81 | const dwp_gen_out = run_dwp_gen_exe.addOutputFileArg("dwp.bin.z"); |
| @@ -71,131 +83,175 @@ pub fn build(b: *std.Build) void { | |||
| 71 | // Normalization properties | 83 | // Normalization properties |
| 72 | const canon_gen_exe = b.addExecutable(.{ | 84 | const canon_gen_exe = b.addExecutable(.{ |
| 73 | .name = "canon", | 85 | .name = "canon", |
| 74 | .root_source_file = b.path("codegen/canon.zig"), | 86 | .root_module = b.createModule(.{ |
| 75 | .target = b.graph.host, | 87 | .root_source_file = b.path("codegen/canon.zig"), |
| 76 | .optimize = .Debug, | 88 | .target = b.graph.host, |
| 89 | .optimize = .Debug, | ||
| 90 | }), | ||
| 77 | }); | 91 | }); |
| 92 | canon_gen_exe.root_module.addAnonymousImport("UnicodeData.txt", .{ .root_source_file = b.path("data/unicode/UnicodeData.txt") }); | ||
| 78 | const run_canon_gen_exe = b.addRunArtifact(canon_gen_exe); | 93 | const run_canon_gen_exe = b.addRunArtifact(canon_gen_exe); |
| 79 | const canon_gen_out = run_canon_gen_exe.addOutputFileArg("canon.bin.z"); | 94 | const canon_gen_out = run_canon_gen_exe.addOutputFileArg("canon.bin.z"); |
| 80 | 95 | ||
| 81 | const compat_gen_exe = b.addExecutable(.{ | 96 | const compat_gen_exe = b.addExecutable(.{ |
| 82 | .name = "compat", | 97 | .name = "compat", |
| 83 | .root_source_file = b.path("codegen/compat.zig"), | 98 | .root_module = b.createModule(.{ |
| 84 | .target = b.graph.host, | 99 | .root_source_file = b.path("codegen/compat.zig"), |
| 85 | .optimize = .Debug, | 100 | .target = b.graph.host, |
| 101 | .optimize = .Debug, | ||
| 102 | }), | ||
| 86 | }); | 103 | }); |
| 104 | compat_gen_exe.root_module.addAnonymousImport("UnicodeData.txt", .{ .root_source_file = b.path("data/unicode/UnicodeData.txt") }); | ||
| 87 | const run_compat_gen_exe = b.addRunArtifact(compat_gen_exe); | 105 | const run_compat_gen_exe = b.addRunArtifact(compat_gen_exe); |
| 88 | const compat_gen_out = run_compat_gen_exe.addOutputFileArg("compat.bin.z"); | 106 | const compat_gen_out = run_compat_gen_exe.addOutputFileArg("compat.bin.z"); |
| 89 | 107 | ||
| 90 | const hangul_gen_exe = b.addExecutable(.{ | 108 | const hangul_gen_exe = b.addExecutable(.{ |
| 91 | .name = "hangul", | 109 | .name = "hangul", |
| 92 | .root_source_file = b.path("codegen/hangul.zig"), | 110 | .root_module = b.createModule(.{ |
| 93 | .target = b.graph.host, | 111 | .root_source_file = b.path("codegen/hangul.zig"), |
| 94 | .optimize = .Debug, | 112 | .target = b.graph.host, |
| 113 | .optimize = .Debug, | ||
| 114 | }), | ||
| 95 | }); | 115 | }); |
| 116 | hangul_gen_exe.root_module.addAnonymousImport("HangulSyllableType.txt", .{ .root_source_file = b.path("data/unicode/HangulSyllableType.txt") }); | ||
| 96 | const run_hangul_gen_exe = b.addRunArtifact(hangul_gen_exe); | 117 | const run_hangul_gen_exe = b.addRunArtifact(hangul_gen_exe); |
| 97 | const hangul_gen_out = run_hangul_gen_exe.addOutputFileArg("hangul.bin.z"); | 118 | const hangul_gen_out = run_hangul_gen_exe.addOutputFileArg("hangul.bin.z"); |
| 98 | 119 | ||
| 99 | const normp_gen_exe = b.addExecutable(.{ | 120 | const normp_gen_exe = b.addExecutable(.{ |
| 100 | .name = "normp", | 121 | .name = "normp", |
| 101 | .root_source_file = b.path("codegen/normp.zig"), | 122 | .root_module = b.createModule(.{ |
| 102 | .target = b.graph.host, | 123 | .root_source_file = b.path("codegen/normp.zig"), |
| 103 | .optimize = .Debug, | 124 | .target = b.graph.host, |
| 125 | .optimize = .Debug, | ||
| 126 | }), | ||
| 104 | }); | 127 | }); |
| 128 | normp_gen_exe.root_module.addAnonymousImport("DerivedNormalizationProps.txt", .{ .root_source_file = b.path("data/unicode/DerivedNormalizationProps.txt") }); | ||
| 105 | const run_normp_gen_exe = b.addRunArtifact(normp_gen_exe); | 129 | const run_normp_gen_exe = b.addRunArtifact(normp_gen_exe); |
| 106 | const normp_gen_out = run_normp_gen_exe.addOutputFileArg("normp.bin.z"); | 130 | const normp_gen_out = run_normp_gen_exe.addOutputFileArg("normp.bin.z"); |
| 107 | 131 | ||
| 108 | const ccc_gen_exe = b.addExecutable(.{ | 132 | const ccc_gen_exe = b.addExecutable(.{ |
| 109 | .name = "ccc", | 133 | .name = "ccc", |
| 110 | .root_source_file = b.path("codegen/ccc.zig"), | 134 | .root_module = b.createModule(.{ |
| 111 | .target = b.graph.host, | 135 | .root_source_file = b.path("codegen/ccc.zig"), |
| 112 | .optimize = .Debug, | 136 | .target = b.graph.host, |
| 137 | .optimize = .Debug, | ||
| 138 | }), | ||
| 113 | }); | 139 | }); |
| 140 | ccc_gen_exe.root_module.addAnonymousImport("DerivedCombiningClass.txt", .{ .root_source_file = b.path("data/unicode/extracted/DerivedCombiningClass.txt") }); | ||
| 114 | const run_ccc_gen_exe = b.addRunArtifact(ccc_gen_exe); | 141 | const run_ccc_gen_exe = b.addRunArtifact(ccc_gen_exe); |
| 115 | const ccc_gen_out = run_ccc_gen_exe.addOutputFileArg("ccc.bin.z"); | 142 | const ccc_gen_out = run_ccc_gen_exe.addOutputFileArg("ccc.bin.z"); |
| 116 | 143 | ||
| 117 | const gencat_gen_exe = b.addExecutable(.{ | 144 | const gencat_gen_exe = b.addExecutable(.{ |
| 118 | .name = "gencat", | 145 | .name = "gencat", |
| 119 | .root_source_file = b.path("codegen/gencat.zig"), | 146 | .root_module = b.createModule(.{ |
| 120 | .target = b.graph.host, | 147 | .root_source_file = b.path("codegen/gencat.zig"), |
| 121 | .optimize = .Debug, | 148 | .target = b.graph.host, |
| 149 | .optimize = .Debug, | ||
| 150 | }), | ||
| 122 | }); | 151 | }); |
| 152 | gencat_gen_exe.root_module.addAnonymousImport("DerivedGeneralCategory.txt", .{ .root_source_file = b.path("data/unicode/extracted/DerivedGeneralCategory.txt") }); | ||
| 123 | const run_gencat_gen_exe = b.addRunArtifact(gencat_gen_exe); | 153 | const run_gencat_gen_exe = b.addRunArtifact(gencat_gen_exe); |
| 124 | const gencat_gen_out = run_gencat_gen_exe.addOutputFileArg("gencat.bin.z"); | 154 | const gencat_gen_out = run_gencat_gen_exe.addOutputFileArg("gencat.bin.z"); |
| 125 | 155 | ||
| 126 | const fold_gen_exe = b.addExecutable(.{ | 156 | const fold_gen_exe = b.addExecutable(.{ |
| 127 | .name = "fold", | 157 | .name = "fold", |
| 128 | .root_source_file = b.path("codegen/fold.zig"), | 158 | .root_module = b.createModule(.{ |
| 129 | .target = b.graph.host, | 159 | .root_source_file = b.path("codegen/fold.zig"), |
| 130 | .optimize = .Debug, | 160 | .target = b.graph.host, |
| 131 | }); | 161 | .optimize = .Debug, |
| 162 | }), | ||
| 163 | }); | ||
| 164 | fold_gen_exe.root_module.addAnonymousImport("DerivedCoreProperties.txt", .{ .root_source_file = b.path("data/unicode/DerivedCoreProperties.txt") }); | ||
| 165 | fold_gen_exe.root_module.addAnonymousImport("CaseFolding.txt", .{ .root_source_file = b.path("data/unicode/CaseFolding.txt") }); | ||
| 132 | const run_fold_gen_exe = b.addRunArtifact(fold_gen_exe); | 166 | const run_fold_gen_exe = b.addRunArtifact(fold_gen_exe); |
| 133 | const fold_gen_out = run_fold_gen_exe.addOutputFileArg("fold.bin.z"); | 167 | const fold_gen_out = run_fold_gen_exe.addOutputFileArg("fold.bin.z"); |
| 134 | 168 | ||
| 135 | // Numeric types | 169 | // Numeric types |
| 136 | const num_gen_exe = b.addExecutable(.{ | 170 | const num_gen_exe = b.addExecutable(.{ |
| 137 | .name = "numeric", | 171 | .name = "numeric", |
| 138 | .root_source_file = b.path("codegen/numeric.zig"), | 172 | .root_module = b.createModule(.{ |
| 139 | .target = b.graph.host, | 173 | .root_source_file = b.path("codegen/numeric.zig"), |
| 140 | .optimize = .Debug, | 174 | .target = b.graph.host, |
| 175 | .optimize = .Debug, | ||
| 176 | }), | ||
| 141 | }); | 177 | }); |
| 178 | num_gen_exe.root_module.addAnonymousImport("DerivedNumericType.txt", .{ .root_source_file = b.path("data/unicode/extracted/DerivedNumericType.txt") }); | ||
| 142 | const run_num_gen_exe = b.addRunArtifact(num_gen_exe); | 179 | const run_num_gen_exe = b.addRunArtifact(num_gen_exe); |
| 143 | const num_gen_out = run_num_gen_exe.addOutputFileArg("numeric.bin.z"); | 180 | const num_gen_out = run_num_gen_exe.addOutputFileArg("numeric.bin.z"); |
| 144 | 181 | ||
| 145 | // Letter case properties | 182 | // Letter case properties |
| 146 | const case_prop_gen_exe = b.addExecutable(.{ | 183 | const case_prop_gen_exe = b.addExecutable(.{ |
| 147 | .name = "case_prop", | 184 | .name = "case_prop", |
| 148 | .root_source_file = b.path("codegen/case_prop.zig"), | 185 | .root_module = b.createModule(.{ |
| 149 | .target = b.graph.host, | 186 | .root_source_file = b.path("codegen/case_prop.zig"), |
| 150 | .optimize = .Debug, | 187 | .target = b.graph.host, |
| 188 | .optimize = .Debug, | ||
| 189 | }), | ||
| 151 | }); | 190 | }); |
| 191 | case_prop_gen_exe.root_module.addAnonymousImport("DerivedCoreProperties.txt", .{ .root_source_file = b.path("data/unicode/DerivedCoreProperties.txt") }); | ||
| 152 | const run_case_prop_gen_exe = b.addRunArtifact(case_prop_gen_exe); | 192 | const run_case_prop_gen_exe = b.addRunArtifact(case_prop_gen_exe); |
| 153 | const case_prop_gen_out = run_case_prop_gen_exe.addOutputFileArg("case_prop.bin.z"); | 193 | const case_prop_gen_out = run_case_prop_gen_exe.addOutputFileArg("case_prop.bin.z"); |
| 154 | 194 | ||
| 155 | // Uppercase mappings | 195 | // Uppercase mappings |
| 156 | const upper_gen_exe = b.addExecutable(.{ | 196 | const upper_gen_exe = b.addExecutable(.{ |
| 157 | .name = "upper", | 197 | .name = "upper", |
| 158 | .root_source_file = b.path("codegen/upper.zig"), | 198 | .root_module = b.createModule(.{ |
| 159 | .target = b.graph.host, | 199 | .root_source_file = b.path("codegen/upper.zig"), |
| 160 | .optimize = .Debug, | 200 | .target = b.graph.host, |
| 201 | .optimize = .Debug, | ||
| 202 | }), | ||
| 161 | }); | 203 | }); |
| 204 | upper_gen_exe.root_module.addAnonymousImport("UnicodeData.txt", .{ .root_source_file = b.path("data/unicode/UnicodeData.txt") }); | ||
| 162 | const run_upper_gen_exe = b.addRunArtifact(upper_gen_exe); | 205 | const run_upper_gen_exe = b.addRunArtifact(upper_gen_exe); |
| 163 | const upper_gen_out = run_upper_gen_exe.addOutputFileArg("upper.bin.z"); | 206 | const upper_gen_out = run_upper_gen_exe.addOutputFileArg("upper.bin.z"); |
| 164 | 207 | ||
| 165 | // Lowercase mappings | 208 | // Lowercase mappings |
| 166 | const lower_gen_exe = b.addExecutable(.{ | 209 | const lower_gen_exe = b.addExecutable(.{ |
| 167 | .name = "lower", | 210 | .name = "lower", |
| 168 | .root_source_file = b.path("codegen/lower.zig"), | 211 | .root_module = b.createModule(.{ |
| 169 | .target = b.graph.host, | 212 | .root_source_file = b.path("codegen/lower.zig"), |
| 170 | .optimize = .Debug, | 213 | .target = b.graph.host, |
| 214 | .optimize = .Debug, | ||
| 215 | }), | ||
| 171 | }); | 216 | }); |
| 217 | lower_gen_exe.root_module.addAnonymousImport("UnicodeData.txt", .{ .root_source_file = b.path("data/unicode/UnicodeData.txt") }); | ||
| 172 | const run_lower_gen_exe = b.addRunArtifact(lower_gen_exe); | 218 | const run_lower_gen_exe = b.addRunArtifact(lower_gen_exe); |
| 173 | const lower_gen_out = run_lower_gen_exe.addOutputFileArg("lower.bin.z"); | 219 | const lower_gen_out = run_lower_gen_exe.addOutputFileArg("lower.bin.z"); |
| 174 | 220 | ||
| 175 | const scripts_gen_exe = b.addExecutable(.{ | 221 | const scripts_gen_exe = b.addExecutable(.{ |
| 176 | .name = "scripts", | 222 | .name = "scripts", |
| 177 | .root_source_file = b.path("codegen/scripts.zig"), | 223 | .root_module = b.createModule(.{ |
| 178 | .target = b.graph.host, | 224 | .root_source_file = b.path("codegen/scripts.zig"), |
| 179 | .optimize = .Debug, | 225 | .target = b.graph.host, |
| 226 | .optimize = .Debug, | ||
| 227 | }), | ||
| 180 | }); | 228 | }); |
| 229 | scripts_gen_exe.root_module.addAnonymousImport("Scripts.txt", .{ .root_source_file = b.path("data/unicode/Scripts.txt") }); | ||
| 181 | const run_scripts_gen_exe = b.addRunArtifact(scripts_gen_exe); | 230 | const run_scripts_gen_exe = b.addRunArtifact(scripts_gen_exe); |
| 182 | const scripts_gen_out = run_scripts_gen_exe.addOutputFileArg("scripts.bin.z"); | 231 | const scripts_gen_out = run_scripts_gen_exe.addOutputFileArg("scripts.bin.z"); |
| 183 | 232 | ||
| 184 | const core_gen_exe = b.addExecutable(.{ | 233 | const core_gen_exe = b.addExecutable(.{ |
| 185 | .name = "core", | 234 | .name = "core", |
| 186 | .root_source_file = b.path("codegen/core_props.zig"), | 235 | .root_module = b.createModule(.{ |
| 187 | .target = b.graph.host, | 236 | .root_source_file = b.path("codegen/core_props.zig"), |
| 188 | .optimize = .Debug, | 237 | .target = b.graph.host, |
| 238 | .optimize = .Debug, | ||
| 239 | }), | ||
| 189 | }); | 240 | }); |
| 241 | core_gen_exe.root_module.addAnonymousImport("DerivedCoreProperties.txt", .{ .root_source_file = b.path("data/unicode/DerivedCoreProperties.txt") }); | ||
| 190 | const run_core_gen_exe = b.addRunArtifact(core_gen_exe); | 242 | const run_core_gen_exe = b.addRunArtifact(core_gen_exe); |
| 191 | const core_gen_out = run_core_gen_exe.addOutputFileArg("core_props.bin.z"); | 243 | const core_gen_out = run_core_gen_exe.addOutputFileArg("core_props.bin.z"); |
| 192 | 244 | ||
| 193 | const props_gen_exe = b.addExecutable(.{ | 245 | const props_gen_exe = b.addExecutable(.{ |
| 194 | .name = "props", | 246 | .name = "props", |
| 195 | .root_source_file = b.path("codegen/props.zig"), | 247 | .root_module = b.createModule(.{ |
| 196 | .target = b.graph.host, | 248 | .root_source_file = b.path("codegen/props.zig"), |
| 197 | .optimize = .Debug, | 249 | .target = b.graph.host, |
| 250 | .optimize = .Debug, | ||
| 251 | }), | ||
| 198 | }); | 252 | }); |
| 253 | |||
| 254 | props_gen_exe.root_module.addAnonymousImport("PropList.txt", .{ .root_source_file = b.path("data/unicode/PropList.txt") }); | ||
| 199 | const run_props_gen_exe = b.addRunArtifact(props_gen_exe); | 255 | const run_props_gen_exe = b.addRunArtifact(props_gen_exe); |
| 200 | const props_gen_out = run_props_gen_exe.addOutputFileArg("props.bin.z"); | 256 | const props_gen_out = run_props_gen_exe.addOutputFileArg("props.bin.z"); |
| 201 | 257 | ||
| @@ -212,8 +268,6 @@ pub fn build(b: *std.Build) void { | |||
| 212 | const code_point_t = b.addTest(.{ | 268 | const code_point_t = b.addTest(.{ |
| 213 | .name = "code_point", | 269 | .name = "code_point", |
| 214 | .root_module = code_point, | 270 | .root_module = code_point, |
| 215 | .target = target, | ||
| 216 | .optimize = optimize, | ||
| 217 | }); | 271 | }); |
| 218 | const code_point_tr = b.addRunArtifact(code_point_t); | 272 | const code_point_tr = b.addRunArtifact(code_point_t); |
| 219 | 273 | ||
| @@ -230,8 +284,6 @@ pub fn build(b: *std.Build) void { | |||
| 230 | const grapheme_t = b.addTest(.{ | 284 | const grapheme_t = b.addTest(.{ |
| 231 | .name = "Graphemes", | 285 | .name = "Graphemes", |
| 232 | .root_module = graphemes, | 286 | .root_module = graphemes, |
| 233 | .target = target, | ||
| 234 | .optimize = optimize, | ||
| 235 | }); | 287 | }); |
| 236 | const grapheme_tr = b.addRunArtifact(grapheme_t); | 288 | const grapheme_tr = b.addRunArtifact(grapheme_t); |
| 237 | 289 | ||
| @@ -247,8 +299,6 @@ pub fn build(b: *std.Build) void { | |||
| 247 | const words_t = b.addTest(.{ | 299 | const words_t = b.addTest(.{ |
| 248 | .name = "WordBreak", | 300 | .name = "WordBreak", |
| 249 | .root_module = words, | 301 | .root_module = words, |
| 250 | .target = target, | ||
| 251 | .optimize = optimize, | ||
| 252 | }); | 302 | }); |
| 253 | const words_tr = b.addRunArtifact(words_t); | 303 | const words_tr = b.addRunArtifact(words_t); |
| 254 | 304 | ||
| @@ -262,8 +312,6 @@ pub fn build(b: *std.Build) void { | |||
| 262 | const ascii_t = b.addTest(.{ | 312 | const ascii_t = b.addTest(.{ |
| 263 | .name = "ascii", | 313 | .name = "ascii", |
| 264 | .root_module = ascii, | 314 | .root_module = ascii, |
| 265 | .target = target, | ||
| 266 | .optimize = optimize, | ||
| 267 | }); | 315 | }); |
| 268 | const ascii_tr = b.addRunArtifact(ascii_t); | 316 | const ascii_tr = b.addRunArtifact(ascii_t); |
| 269 | 317 | ||
| @@ -282,8 +330,6 @@ pub fn build(b: *std.Build) void { | |||
| 282 | const display_width_t = b.addTest(.{ | 330 | const display_width_t = b.addTest(.{ |
| 283 | .name = "display_width", | 331 | .name = "display_width", |
| 284 | .root_module = display_width, | 332 | .root_module = display_width, |
| 285 | .target = target, | ||
| 286 | .optimize = optimize, | ||
| 287 | }); | 333 | }); |
| 288 | const display_width_tr = b.addRunArtifact(display_width_t); | 334 | const display_width_tr = b.addRunArtifact(display_width_t); |
| 289 | 335 | ||
| @@ -298,8 +344,6 @@ pub fn build(b: *std.Build) void { | |||
| 298 | const ccc_data_t = b.addTest(.{ | 344 | const ccc_data_t = b.addTest(.{ |
| 299 | .name = "ccc_data", | 345 | .name = "ccc_data", |
| 300 | .root_module = ccc_data, | 346 | .root_module = ccc_data, |
| 301 | .target = target, | ||
| 302 | .optimize = optimize, | ||
| 303 | }); | 347 | }); |
| 304 | const ccc_data_tr = b.addRunArtifact(ccc_data_t); | 348 | const ccc_data_tr = b.addRunArtifact(ccc_data_t); |
| 305 | 349 | ||
| @@ -314,8 +358,6 @@ pub fn build(b: *std.Build) void { | |||
| 314 | const canon_data_t = b.addTest(.{ | 358 | const canon_data_t = b.addTest(.{ |
| 315 | .name = "canon_data", | 359 | .name = "canon_data", |
| 316 | .root_module = canon_data, | 360 | .root_module = canon_data, |
| 317 | .target = target, | ||
| 318 | .optimize = optimize, | ||
| 319 | }); | 361 | }); |
| 320 | const canon_data_tr = b.addRunArtifact(canon_data_t); | 362 | const canon_data_tr = b.addRunArtifact(canon_data_t); |
| 321 | 363 | ||
| @@ -330,8 +372,6 @@ pub fn build(b: *std.Build) void { | |||
| 330 | const compat_data_t = b.addTest(.{ | 372 | const compat_data_t = b.addTest(.{ |
| 331 | .name = "compat_data", | 373 | .name = "compat_data", |
| 332 | .root_module = compat_data, | 374 | .root_module = compat_data, |
| 333 | .target = target, | ||
| 334 | .optimize = optimize, | ||
| 335 | }); | 375 | }); |
| 336 | const compat_data_tr = b.addRunArtifact(compat_data_t); | 376 | const compat_data_tr = b.addRunArtifact(compat_data_t); |
| 337 | 377 | ||
| @@ -345,8 +385,6 @@ pub fn build(b: *std.Build) void { | |||
| 345 | const hangul_data_t = b.addTest(.{ | 385 | const hangul_data_t = b.addTest(.{ |
| 346 | .name = "hangul_data", | 386 | .name = "hangul_data", |
| 347 | .root_module = hangul_data, | 387 | .root_module = hangul_data, |
| 348 | .target = target, | ||
| 349 | .optimize = optimize, | ||
| 350 | }); | 388 | }); |
| 351 | const hangul_data_tr = b.addRunArtifact(hangul_data_t); | 389 | const hangul_data_tr = b.addRunArtifact(hangul_data_t); |
| 352 | 390 | ||
| @@ -360,8 +398,6 @@ pub fn build(b: *std.Build) void { | |||
| 360 | const normp_data_t = b.addTest(.{ | 398 | const normp_data_t = b.addTest(.{ |
| 361 | .name = "normp_data", | 399 | .name = "normp_data", |
| 362 | .root_module = normp_data, | 400 | .root_module = normp_data, |
| 363 | .target = target, | ||
| 364 | .optimize = optimize, | ||
| 365 | }); | 401 | }); |
| 366 | const normp_data_tr = b.addRunArtifact(normp_data_t); | 402 | const normp_data_tr = b.addRunArtifact(normp_data_t); |
| 367 | 403 | ||
| @@ -381,8 +417,6 @@ pub fn build(b: *std.Build) void { | |||
| 381 | const norm_t = b.addTest(.{ | 417 | const norm_t = b.addTest(.{ |
| 382 | .name = "norm", | 418 | .name = "norm", |
| 383 | .root_module = norm, | 419 | .root_module = norm, |
| 384 | .target = target, | ||
| 385 | .optimize = optimize, | ||
| 386 | }); | 420 | }); |
| 387 | const norm_tr = b.addRunArtifact(norm_t); | 421 | const norm_tr = b.addRunArtifact(norm_t); |
| 388 | 422 | ||
| @@ -397,8 +431,6 @@ pub fn build(b: *std.Build) void { | |||
| 397 | const gencat_t = b.addTest(.{ | 431 | const gencat_t = b.addTest(.{ |
| 398 | .name = "gencat", | 432 | .name = "gencat", |
| 399 | .root_module = gencat, | 433 | .root_module = gencat, |
| 400 | .target = target, | ||
| 401 | .optimize = optimize, | ||
| 402 | }); | 434 | }); |
| 403 | const gencat_tr = b.addRunArtifact(gencat_t); | 435 | const gencat_tr = b.addRunArtifact(gencat_t); |
| 404 | 436 | ||
| @@ -415,8 +447,6 @@ pub fn build(b: *std.Build) void { | |||
| 415 | const case_fold_t = b.addTest(.{ | 447 | const case_fold_t = b.addTest(.{ |
| 416 | .name = "case_fold", | 448 | .name = "case_fold", |
| 417 | .root_module = case_fold, | 449 | .root_module = case_fold, |
| 418 | .target = target, | ||
| 419 | .optimize = optimize, | ||
| 420 | }); | 450 | }); |
| 421 | const case_fold_tr = b.addRunArtifact(case_fold_t); | 451 | const case_fold_tr = b.addRunArtifact(case_fold_t); |
| 422 | 452 | ||
| @@ -434,8 +464,6 @@ pub fn build(b: *std.Build) void { | |||
| 434 | const letter_case_t = b.addTest(.{ | 464 | const letter_case_t = b.addTest(.{ |
| 435 | .name = "lettercase", | 465 | .name = "lettercase", |
| 436 | .root_module = letter_case, | 466 | .root_module = letter_case, |
| 437 | .target = target, | ||
| 438 | .optimize = optimize, | ||
| 439 | }); | 467 | }); |
| 440 | const letter_case_tr = b.addRunArtifact(letter_case_t); | 468 | const letter_case_tr = b.addRunArtifact(letter_case_t); |
| 441 | 469 | ||
| @@ -450,8 +478,6 @@ pub fn build(b: *std.Build) void { | |||
| 450 | const scripts_t = b.addTest(.{ | 478 | const scripts_t = b.addTest(.{ |
| 451 | .name = "scripts", | 479 | .name = "scripts", |
| 452 | .root_module = scripts, | 480 | .root_module = scripts, |
| 453 | .target = target, | ||
| 454 | .optimize = optimize, | ||
| 455 | }); | 481 | }); |
| 456 | const scripts_tr = b.addRunArtifact(scripts_t); | 482 | const scripts_tr = b.addRunArtifact(scripts_t); |
| 457 | 483 | ||
| @@ -468,17 +494,20 @@ pub fn build(b: *std.Build) void { | |||
| 468 | const properties_t = b.addTest(.{ | 494 | const properties_t = b.addTest(.{ |
| 469 | .name = "properties", | 495 | .name = "properties", |
| 470 | .root_module = properties, | 496 | .root_module = properties, |
| 471 | .target = target, | ||
| 472 | .optimize = optimize, | ||
| 473 | }); | 497 | }); |
| 474 | const properties_tr = b.addRunArtifact(properties_t); | 498 | const properties_tr = b.addRunArtifact(properties_t); |
| 475 | 499 | ||
| 476 | // Unicode Tests | 500 | // Unicode Tests |
| 477 | const unicode_tests = b.addTest(.{ | 501 | const unicode_tests = b.addTest(.{ |
| 478 | .root_source_file = b.path("src/unicode_tests.zig"), | 502 | .root_module = b.createModule(.{ |
| 479 | .target = target, | 503 | .root_source_file = b.path("src/unicode_tests.zig"), |
| 480 | .optimize = optimize, | 504 | .target = target, |
| 481 | }); | 505 | .optimize = optimize, |
| 506 | }), | ||
| 507 | }); | ||
| 508 | unicode_tests.root_module.addAnonymousImport("GraphemeBreakTest.txt", .{ .root_source_file = b.path("data/unicode/auxiliary/GraphemeBreakTest.txt") }); | ||
| 509 | unicode_tests.root_module.addAnonymousImport("NormalizationTest.txt", .{ .root_source_file = b.path("data/unicode/NormalizationTest.txt") }); | ||
| 510 | unicode_tests.root_module.addAnonymousImport("WordBreakTest.txt", .{ .root_source_file = b.path("data/unicode/auxiliary/WordBreakTest.txt") }); | ||
| 482 | unicode_tests.root_module.addImport("Graphemes", graphemes); | 511 | unicode_tests.root_module.addImport("Graphemes", graphemes); |
| 483 | unicode_tests.root_module.addImport("Normalize", norm); | 512 | unicode_tests.root_module.addImport("Normalize", norm); |
| 484 | unicode_tests.root_module.addImport("Words", words); | 513 | unicode_tests.root_module.addImport("Words", words); |