test.link.glibc_compat: fix invalid build system API usage

This commit is contained in:
Andrew Kelley 2023-12-27 17:52:12 -07:00
parent 8babc14cdf
commit 027e7c1c49

View File

@ -7,11 +7,11 @@ pub fn build(b: *std.Build) void {
for ([_][]const u8{ "aarch64-linux-gnu.2.27", "aarch64-linux-gnu.2.34" }) |t| {
const exe = b.addExecutable(.{
.name = t,
.root_source_file = .{ .path = "main.c" },
.target = b.resolveTargetQuery(std.Target.Query.parse(
.{ .arch_os_abi = t },
) catch unreachable),
});
exe.addCSourceFile(.{ .file = .{ .path = "main.c" } });
exe.linkLibC();
// TODO: actually test the output
_ = exe.getEmittedBin();