Commit 936c1fa

Eric Bower  ·  2026-05-16 10:47:25 -0400 EDT
parent 0a5a2a9
fix: statically link against musl
1 files changed,  +8, -1
+8, -1
......@@ -11,7 +11,13 @@ const macos_targets: []const std.Target.Query = &.{
1111 };
1212
1313 pub fn build(b: *std.Build) void {
14- const target = b.standardTargetOptions(.{});
14+ const target = b.standardTargetOptions(.{
15+ .default_target = .{
16+ .cpu_arch = .x86_64,
17+ .os_tag = .linux,
18+ .abi = .musl,
19+ },
20+ });
1521 const optimize = b.standardOptimizeOption(.{});
1622 const version = b.option([]const u8, "version", "Version string for release") orelse
1723 @as([]const u8, @import("build.zig.zon").version);
......@@ -71,6 +77,7 @@ pub fn build(b: *std.Build) void {
7177 const exe_unit_tests = b.addTest(.{
7278 .root_module = test_module,
7379 });
80+ exe_unit_tests.linkLibC();
7481 const run_exe_unit_tests = b.addRunArtifact(exe_unit_tests);
7582 test_step.dependOn(&run_exe_unit_tests.step);
7683 }