authorgravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2024-12-16 15:45:29+00:00
committergravatar for bratishkaerik@landless-city.netEric Joldasov <bratishkaerik@landless-city.net> 2024-12-18 01:49:05+05:00
log1cfbfc1d3429d33e3c02f6f68b4cc94370d95db5
treebf192e627d5782a74cea1b296cfa58ef068ed118
parent8c5c1de60b71b4310ae629c30e3c7b0df3575341
signaturelock-open Commit is signed but in an unrecognized format.

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


2 files changed, 8 insertions(+), 2 deletions(-)

test/src/Cases.zig+4-1
...@@ -572,7 +572,10 @@ pub fn lowerToTranslateCSteps(...@@ -572,7 +572,10 @@ pub fn lowerToTranslateCSteps(
572 });572 });
573 translate_c.step.name = b.fmt("{s} translate-c", .{annotated_case_name});573 translate_c.step.name = b.fmt("{s} translate-c", .{annotated_case_name});
574574
575 const run_exe = translate_c.addExecutable(.{});575 const run_exe = b.addExecutable(.{
576 .name = "translated_c",
577 .root_module = translate_c.createModule(),
578 });
576 run_exe.step.name = b.fmt("{s} build-exe", .{annotated_case_name});579 run_exe.step.name = b.fmt("{s} build-exe", .{annotated_case_name});
577 run_exe.linkLibC();580 run_exe.linkLibC();
578 const run = b.addRunArtifact(run_exe);581 const run = b.addRunArtifact(run_exe);
test/src/RunTranslatedC.zig+4-1
...@@ -84,7 +84,10 @@ pub fn addCase(self: *RunTranslatedCContext, case: *const TestCase) void {...@@ -84,7 +84,10 @@ pub fn addCase(self: *RunTranslatedCContext, case: *const TestCase) void {
84 });84 });
8585
86 translate_c.step.name = b.fmt("{s} translate-c", .{annotated_case_name});86 translate_c.step.name = b.fmt("{s} translate-c", .{annotated_case_name});
87 const exe = translate_c.addExecutable(.{});87 const exe = b.addExecutable(.{
88 .name = "translated_c",
89 .root_module = translate_c.createModule(),
90 });
88 exe.step.name = b.fmt("{s} build-exe", .{annotated_case_name});91 exe.step.name = b.fmt("{s} build-exe", .{annotated_case_name});
89 exe.linkLibC();92 exe.linkLibC();
90 const run = b.addRunArtifact(exe);93 const run = b.addRunArtifact(exe);