test-run-translated-c: migrate from deprecated std.Build APIs

This commit is contained in:
mlugg
2024-12-16 15:45:29 +00:00
committed by Eric Joldasov
parent 8c5c1de60b
commit 1cfbfc1d34
2 changed files with 8 additions and 2 deletions

View File

@@ -572,7 +572,10 @@ pub fn lowerToTranslateCSteps(
});
translate_c.step.name = b.fmt("{s} translate-c", .{annotated_case_name});
const run_exe = translate_c.addExecutable(.{});
const run_exe = b.addExecutable(.{
.name = "translated_c",
.root_module = translate_c.createModule(),
});
run_exe.step.name = b.fmt("{s} build-exe", .{annotated_case_name});
run_exe.linkLibC();
const run = b.addRunArtifact(run_exe);

View File

@@ -84,7 +84,10 @@ pub fn addCase(self: *RunTranslatedCContext, case: *const TestCase) void {
});
translate_c.step.name = b.fmt("{s} translate-c", .{annotated_case_name});
const exe = translate_c.addExecutable(.{});
const exe = b.addExecutable(.{
.name = "translated_c",
.root_module = translate_c.createModule(),
});
exe.step.name = b.fmt("{s} build-exe", .{annotated_case_name});
exe.linkLibC();
const run = b.addRunArtifact(exe);