From 16df10181dab7834370823efc7cce4a55db570c5 Mon Sep 17 00:00:00 2001 From: Michael Chaten Date: Sat, 13 Sep 2025 07:11:50 -0700 Subject: Update build to 0.15.0 --- build.zig | 176 ++++++++++++++++++++++++++++++++------------------------------ 1 file changed, 90 insertions(+), 86 deletions(-) diff --git a/build.zig b/build.zig index ca0eeef..67a009a 100644 --- a/build.zig +++ b/build.zig @@ -42,27 +42,33 @@ pub fn build(b: *std.Build) void { // Grapheme break const gbp_gen_exe = b.addExecutable(.{ .name = "gbp", - .root_source_file = b.path("codegen/gbp.zig"), - .target = b.graph.host, - .optimize = .Debug, + .root_module = b.createModule(.{ + .root_source_file = b.path("codegen/gbp.zig"), + .target = b.graph.host, + .optimize = .Debug, + }), }); const run_gbp_gen_exe = b.addRunArtifact(gbp_gen_exe); const gbp_gen_out = run_gbp_gen_exe.addOutputFileArg("gbp.bin.z"); const wbp_gen_exe = b.addExecutable(.{ .name = "wbp", - .root_source_file = b.path("codegen/wbp.zig"), - .target = b.graph.host, - .optimize = .Debug, + .root_module = b.createModule(.{ + .root_source_file = b.path("codegen/wbp.zig"), + .target = b.graph.host, + .optimize = .Debug, + }), }); const run_wbp_gen_exe = b.addRunArtifact(wbp_gen_exe); const wbp_gen_out = run_wbp_gen_exe.addOutputFileArg("wbp.bin.z"); const dwp_gen_exe = b.addExecutable(.{ .name = "dwp", - .root_source_file = b.path("codegen/dwp.zig"), - .target = b.graph.host, - .optimize = .Debug, + .root_module = b.createModule(.{ + .root_source_file = b.path("codegen/dwp.zig"), + .target = b.graph.host, + .optimize = .Debug, + }), }); dwp_gen_exe.root_module.addOptions("options", dwp_options); const run_dwp_gen_exe = b.addRunArtifact(dwp_gen_exe); @@ -71,63 +77,77 @@ pub fn build(b: *std.Build) void { // Normalization properties const canon_gen_exe = b.addExecutable(.{ .name = "canon", - .root_source_file = b.path("codegen/canon.zig"), - .target = b.graph.host, - .optimize = .Debug, + .root_module = b.createModule(.{ + .root_source_file = b.path("codegen/canon.zig"), + .target = b.graph.host, + .optimize = .Debug, + }), }); const run_canon_gen_exe = b.addRunArtifact(canon_gen_exe); const canon_gen_out = run_canon_gen_exe.addOutputFileArg("canon.bin.z"); const compat_gen_exe = b.addExecutable(.{ .name = "compat", - .root_source_file = b.path("codegen/compat.zig"), - .target = b.graph.host, - .optimize = .Debug, + .root_module = b.createModule(.{ + .root_source_file = b.path("codegen/compat.zig"), + .target = b.graph.host, + .optimize = .Debug, + }), }); const run_compat_gen_exe = b.addRunArtifact(compat_gen_exe); const compat_gen_out = run_compat_gen_exe.addOutputFileArg("compat.bin.z"); const hangul_gen_exe = b.addExecutable(.{ .name = "hangul", - .root_source_file = b.path("codegen/hangul.zig"), - .target = b.graph.host, - .optimize = .Debug, + .root_module = b.createModule(.{ + .root_source_file = b.path("codegen/hangul.zig"), + .target = b.graph.host, + .optimize = .Debug, + }), }); const run_hangul_gen_exe = b.addRunArtifact(hangul_gen_exe); const hangul_gen_out = run_hangul_gen_exe.addOutputFileArg("hangul.bin.z"); const normp_gen_exe = b.addExecutable(.{ .name = "normp", - .root_source_file = b.path("codegen/normp.zig"), - .target = b.graph.host, - .optimize = .Debug, + .root_module = b.createModule(.{ + .root_source_file = b.path("codegen/normp.zig"), + .target = b.graph.host, + .optimize = .Debug, + }), }); const run_normp_gen_exe = b.addRunArtifact(normp_gen_exe); const normp_gen_out = run_normp_gen_exe.addOutputFileArg("normp.bin.z"); const ccc_gen_exe = b.addExecutable(.{ .name = "ccc", - .root_source_file = b.path("codegen/ccc.zig"), - .target = b.graph.host, - .optimize = .Debug, + .root_module = b.createModule(.{ + .root_source_file = b.path("codegen/ccc.zig"), + .target = b.graph.host, + .optimize = .Debug, + }), }); const run_ccc_gen_exe = b.addRunArtifact(ccc_gen_exe); const ccc_gen_out = run_ccc_gen_exe.addOutputFileArg("ccc.bin.z"); const gencat_gen_exe = b.addExecutable(.{ .name = "gencat", - .root_source_file = b.path("codegen/gencat.zig"), - .target = b.graph.host, - .optimize = .Debug, + .root_module = b.createModule(.{ + .root_source_file = b.path("codegen/gencat.zig"), + .target = b.graph.host, + .optimize = .Debug, + }), }); const run_gencat_gen_exe = b.addRunArtifact(gencat_gen_exe); const gencat_gen_out = run_gencat_gen_exe.addOutputFileArg("gencat.bin.z"); const fold_gen_exe = b.addExecutable(.{ .name = "fold", - .root_source_file = b.path("codegen/fold.zig"), - .target = b.graph.host, - .optimize = .Debug, + .root_module = b.createModule(.{ + .root_source_file = b.path("codegen/fold.zig"), + .target = b.graph.host, + .optimize = .Debug, + }), }); const run_fold_gen_exe = b.addRunArtifact(fold_gen_exe); const fold_gen_out = run_fold_gen_exe.addOutputFileArg("fold.bin.z"); @@ -135,9 +155,11 @@ pub fn build(b: *std.Build) void { // Numeric types const num_gen_exe = b.addExecutable(.{ .name = "numeric", - .root_source_file = b.path("codegen/numeric.zig"), - .target = b.graph.host, - .optimize = .Debug, + .root_module = b.createModule(.{ + .root_source_file = b.path("codegen/numeric.zig"), + .target = b.graph.host, + .optimize = .Debug, + }), }); const run_num_gen_exe = b.addRunArtifact(num_gen_exe); const num_gen_out = run_num_gen_exe.addOutputFileArg("numeric.bin.z"); @@ -145,9 +167,11 @@ pub fn build(b: *std.Build) void { // Letter case properties const case_prop_gen_exe = b.addExecutable(.{ .name = "case_prop", - .root_source_file = b.path("codegen/case_prop.zig"), - .target = b.graph.host, - .optimize = .Debug, + .root_module = b.createModule(.{ + .root_source_file = b.path("codegen/case_prop.zig"), + .target = b.graph.host, + .optimize = .Debug, + }), }); const run_case_prop_gen_exe = b.addRunArtifact(case_prop_gen_exe); const case_prop_gen_out = run_case_prop_gen_exe.addOutputFileArg("case_prop.bin.z"); @@ -155,9 +179,11 @@ pub fn build(b: *std.Build) void { // Uppercase mappings const upper_gen_exe = b.addExecutable(.{ .name = "upper", - .root_source_file = b.path("codegen/upper.zig"), - .target = b.graph.host, - .optimize = .Debug, + .root_module = b.createModule(.{ + .root_source_file = b.path("codegen/upper.zig"), + .target = b.graph.host, + .optimize = .Debug, + }), }); const run_upper_gen_exe = b.addRunArtifact(upper_gen_exe); const upper_gen_out = run_upper_gen_exe.addOutputFileArg("upper.bin.z"); @@ -165,36 +191,44 @@ pub fn build(b: *std.Build) void { // Lowercase mappings const lower_gen_exe = b.addExecutable(.{ .name = "lower", - .root_source_file = b.path("codegen/lower.zig"), - .target = b.graph.host, - .optimize = .Debug, + .root_module = b.createModule(.{ + .root_source_file = b.path("codegen/lower.zig"), + .target = b.graph.host, + .optimize = .Debug, + }), }); const run_lower_gen_exe = b.addRunArtifact(lower_gen_exe); const lower_gen_out = run_lower_gen_exe.addOutputFileArg("lower.bin.z"); const scripts_gen_exe = b.addExecutable(.{ .name = "scripts", - .root_source_file = b.path("codegen/scripts.zig"), - .target = b.graph.host, - .optimize = .Debug, + .root_module = b.createModule(.{ + .root_source_file = b.path("codegen/scripts.zig"), + .target = b.graph.host, + .optimize = .Debug, + }), }); const run_scripts_gen_exe = b.addRunArtifact(scripts_gen_exe); const scripts_gen_out = run_scripts_gen_exe.addOutputFileArg("scripts.bin.z"); const core_gen_exe = b.addExecutable(.{ .name = "core", - .root_source_file = b.path("codegen/core_props.zig"), - .target = b.graph.host, - .optimize = .Debug, + .root_module = b.createModule(.{ + .root_source_file = b.path("codegen/core_props.zig"), + .target = b.graph.host, + .optimize = .Debug, + }), }); const run_core_gen_exe = b.addRunArtifact(core_gen_exe); const core_gen_out = run_core_gen_exe.addOutputFileArg("core_props.bin.z"); const props_gen_exe = b.addExecutable(.{ .name = "props", - .root_source_file = b.path("codegen/props.zig"), - .target = b.graph.host, - .optimize = .Debug, + .root_module = b.createModule(.{ + .root_source_file = b.path("codegen/props.zig"), + .target = b.graph.host, + .optimize = .Debug, + }), }); const run_props_gen_exe = b.addRunArtifact(props_gen_exe); const props_gen_out = run_props_gen_exe.addOutputFileArg("props.bin.z"); @@ -212,8 +246,6 @@ pub fn build(b: *std.Build) void { const code_point_t = b.addTest(.{ .name = "code_point", .root_module = code_point, - .target = target, - .optimize = optimize, }); const code_point_tr = b.addRunArtifact(code_point_t); @@ -230,8 +262,6 @@ pub fn build(b: *std.Build) void { const grapheme_t = b.addTest(.{ .name = "Graphemes", .root_module = graphemes, - .target = target, - .optimize = optimize, }); const grapheme_tr = b.addRunArtifact(grapheme_t); @@ -247,8 +277,6 @@ pub fn build(b: *std.Build) void { const words_t = b.addTest(.{ .name = "WordBreak", .root_module = words, - .target = target, - .optimize = optimize, }); const words_tr = b.addRunArtifact(words_t); @@ -262,8 +290,6 @@ pub fn build(b: *std.Build) void { const ascii_t = b.addTest(.{ .name = "ascii", .root_module = ascii, - .target = target, - .optimize = optimize, }); const ascii_tr = b.addRunArtifact(ascii_t); @@ -282,8 +308,6 @@ pub fn build(b: *std.Build) void { const display_width_t = b.addTest(.{ .name = "display_width", .root_module = display_width, - .target = target, - .optimize = optimize, }); const display_width_tr = b.addRunArtifact(display_width_t); @@ -298,8 +322,6 @@ pub fn build(b: *std.Build) void { const ccc_data_t = b.addTest(.{ .name = "ccc_data", .root_module = ccc_data, - .target = target, - .optimize = optimize, }); const ccc_data_tr = b.addRunArtifact(ccc_data_t); @@ -314,8 +336,6 @@ pub fn build(b: *std.Build) void { const canon_data_t = b.addTest(.{ .name = "canon_data", .root_module = canon_data, - .target = target, - .optimize = optimize, }); const canon_data_tr = b.addRunArtifact(canon_data_t); @@ -330,8 +350,6 @@ pub fn build(b: *std.Build) void { const compat_data_t = b.addTest(.{ .name = "compat_data", .root_module = compat_data, - .target = target, - .optimize = optimize, }); const compat_data_tr = b.addRunArtifact(compat_data_t); @@ -345,8 +363,6 @@ pub fn build(b: *std.Build) void { const hangul_data_t = b.addTest(.{ .name = "hangul_data", .root_module = hangul_data, - .target = target, - .optimize = optimize, }); const hangul_data_tr = b.addRunArtifact(hangul_data_t); @@ -360,8 +376,6 @@ pub fn build(b: *std.Build) void { const normp_data_t = b.addTest(.{ .name = "normp_data", .root_module = normp_data, - .target = target, - .optimize = optimize, }); const normp_data_tr = b.addRunArtifact(normp_data_t); @@ -381,8 +395,6 @@ pub fn build(b: *std.Build) void { const norm_t = b.addTest(.{ .name = "norm", .root_module = norm, - .target = target, - .optimize = optimize, }); const norm_tr = b.addRunArtifact(norm_t); @@ -397,8 +409,6 @@ pub fn build(b: *std.Build) void { const gencat_t = b.addTest(.{ .name = "gencat", .root_module = gencat, - .target = target, - .optimize = optimize, }); const gencat_tr = b.addRunArtifact(gencat_t); @@ -415,8 +425,6 @@ pub fn build(b: *std.Build) void { const case_fold_t = b.addTest(.{ .name = "case_fold", .root_module = case_fold, - .target = target, - .optimize = optimize, }); const case_fold_tr = b.addRunArtifact(case_fold_t); @@ -434,8 +442,6 @@ pub fn build(b: *std.Build) void { const letter_case_t = b.addTest(.{ .name = "lettercase", .root_module = letter_case, - .target = target, - .optimize = optimize, }); const letter_case_tr = b.addRunArtifact(letter_case_t); @@ -450,8 +456,6 @@ pub fn build(b: *std.Build) void { const scripts_t = b.addTest(.{ .name = "scripts", .root_module = scripts, - .target = target, - .optimize = optimize, }); const scripts_tr = b.addRunArtifact(scripts_t); @@ -468,16 +472,16 @@ pub fn build(b: *std.Build) void { const properties_t = b.addTest(.{ .name = "properties", .root_module = properties, - .target = target, - .optimize = optimize, }); const properties_tr = b.addRunArtifact(properties_t); // Unicode Tests const unicode_tests = b.addTest(.{ - .root_source_file = b.path("src/unicode_tests.zig"), - .target = target, - .optimize = optimize, + .root_module = b.createModule(.{ + .root_source_file = b.path("src/unicode_tests.zig"), + .target = target, + .optimize = optimize, + }), }); unicode_tests.root_module.addImport("Graphemes", graphemes); unicode_tests.root_module.addImport("Normalize", norm); -- cgit v1.2.3