commit bd1d2b0ae25ead6cd27c0bfeb65490ee92f06bad (tree)
parent b3596d72b07880a49228a5756d509ad51100a53a
Author: Andrew Kelley <andrew@ziglang.org>
Date: Thu, 1 Feb 2024 15:44:01 -0700
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.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/std/Target/Query.zig b/lib/std/Target/Query.zig
@@ -468,7 +468,7 @@ pub fn zigTriple(self: Query, allocator: Allocator) Allocator.Error![]u8 {
}
if (self.glibc_version) |v| {
- const name = @tagName(self.abi orelse builtin.target.abi);
+ const name = if (self.abi) |abi| @tagName(abi) else "gnu";
try result.ensureUnusedCapacity(name.len + 2);
result.appendAssumeCapacity('-');
result.appendSliceAssumeCapacity(name);