@@ -9,7 +9,38 @@ pub fn build(b: *std.Build) !void {
99 });
1010 b .getInstallStep ().dependOn (& fmt_step .step );
1111
12- const obj_f_path = b .path ("bin/aarch64-macos/libunicode_segmentation_bindings.a" );
12+ const path = switch (target .result .os .tag ) {
13+ .macos = > switch (target .result .cpu .arch ) {
14+ .aarch64 = > "bin/aarch64-macos/libunicode_segmentation_bindings.a" ,
15+ .x86_64 = > "bin/x86_64-macos/libunicode_segmentation_bindings.a" ,
16+ else = > @panic (b .fmt ("TODO target: {s}" , .{try target .query .zigTriple (b .allocator )})),
17+ },
18+ .windows = > switch (target .result .cpu .arch ) {
19+ .aarch64 = > "bin/aarch64-windows-msvc/unicode_segmentation_bindings.lib" ,
20+ .x86_64 = > switch (target .result .abi ) {
21+ .gnu = > "bin/aarch64-windows-gnu/libunicode_segmentation_bindings.a" ,
22+ .msvc = > "bin/x86_64-windows-msvc/unicode_segmentation_bindings.lib" ,
23+ else = > @panic (b .fmt ("TODO target: {s}" , .{try target .query .zigTriple (b .allocator )})),
24+ },
25+ else = > @panic (b .fmt ("TODO target: {s}" , .{try target .query .zigTriple (b .allocator )})),
26+ },
27+ .linux = > switch (target .result .cpu .arch ) {
28+ .aarch64 = > switch (target .result .abi ) {
29+ .gnu = > "bin/aarch64-linux-gnu/libunicode_segmentation_bindings.a" ,
30+ .musl = > "bin/aarch64-linux-musl/libunicode_segmentation_bindings.a" ,
31+ else = > @panic (b .fmt ("TODO target: {s}" , .{try target .query .zigTriple (b .allocator )})),
32+ },
33+ .x86_64 = > switch (target .result .abi ) {
34+ .gnu = > "bin/x86_64-linux-gnu/libunicode_segmentation_bindings.a" ,
35+ .musl = > "bin/x86_64-linux-musl/libunicode_segmentation_bindings.a" ,
36+ else = > @panic (b .fmt ("TODO target: {s}" , .{try target .query .zigTriple (b .allocator )})),
37+ },
38+ else = > @panic (b .fmt ("TODO target: {s}" , .{try target .query .zigTriple (b .allocator )})),
39+ },
40+ else = > @panic (b .fmt ("TODO target: {s}" , .{try target .query .zigTriple (b .allocator )})),
41+ };
42+
43+ const obj_f_path = b .path (path );
1344
1445 const test_exe = b .addTest (.{
1546 .root_source_file = b .path ("src/grapheme_cursor.zig" ),
0 commit comments