Skip to content

Commit

Permalink
build: force musl on native linux builds only if sanitizers are off
Browse files Browse the repository at this point in the history
  • Loading branch information
ripperi committed Nov 14, 2024
1 parent cab7ae0 commit 07cff6e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ pub fn build(b: *std.Build) !void {
const t = target.result;
try buildBinary(
b,
if (t.os.tag == .linux and target.query.isNative())
if (t.os.tag == .linux and
target.query.isNative() and
!asan and !ubsan)
b.resolveTargetQuery(.{ .abi = .musl })
else
target,
Expand Down

0 comments on commit 07cff6e

Please sign in to comment.