Skip to content

Commit cad69e2

Browse files
alexrpandrewrk
authored andcommitted
std.Target.Query: Fix parse test on ABIs like gnueabi, gnuabi64, etc.
The `zigTriple()` implementation simply returns `gnu` when a glibc version is provided but a more specific ABI isn't.
1 parent 85747b2 commit cad69e2

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

lib/std/Target/Query.zig

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -588,14 +588,7 @@ test parse {
588588
const text = try query.zigTriple(std.testing.allocator);
589589
defer std.testing.allocator.free(text);
590590

591-
var buf: [256]u8 = undefined;
592-
const triple = std.fmt.bufPrint(
593-
buf[0..],
594-
"native-native-{s}.2.1.1",
595-
.{@tagName(builtin.target.abi)},
596-
) catch unreachable;
597-
598-
try std.testing.expectEqualSlices(u8, triple, text);
591+
try std.testing.expectEqualSlices(u8, "native-native-gnu.2.1.1", text);
599592
}
600593
{
601594
const query = try Query.parse(.{

0 commit comments

Comments
 (0)