mirror of
https://github.com/ziglang/zig.git
synced 2024-11-28 08:02:32 +00:00
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.
This commit is contained in:
parent
b3596d72b0
commit
bd1d2b0ae2
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user