Skip to content

Commit f2ef9d1

Browse files
committed
std.Target.Query: avoid using builtin.target.abi
This value is very likely incorrect. When glibc_version is provided but no explicit ABI is provided, use the string "gnu" instead.
1 parent dbeda3e commit f2ef9d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/std/Target/Query.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ pub fn zigTriple(self: Query, allocator: Allocator) Allocator.Error![]u8 {
468468
}
469469

470470
if (self.glibc_version) |v| {
471-
const name = @tagName(self.abi orelse builtin.target.abi);
471+
const name = if (self.abi) |abi| @tagName(abi) else "gnu";
472472
try result.ensureUnusedCapacity(name.len + 2);
473473
result.appendAssumeCapacity('-');
474474
result.appendSliceAssumeCapacity(name);

0 commit comments

Comments
 (0)