tests: run-translated-c now respects -Dtarget

This commit is contained in:
Andrew Kelley
2020-12-08 13:46:05 -07:00
parent c2de3bdc12
commit 5c13a4e54a
3 changed files with 9 additions and 2 deletions

View File

@@ -13,6 +13,7 @@ pub const RunTranslatedCContext = struct {
step: *build.Step,
test_index: usize,
test_filter: ?[]const u8,
target: std.zig.CrossTarget,
const TestCase = struct {
name: []const u8,
@@ -93,6 +94,7 @@ pub const RunTranslatedCContext = struct {
});
translate_c.step.name = b.fmt("{} translate-c", .{annotated_case_name});
const exe = translate_c.addExecutable();
exe.setTarget(self.target);
exe.step.name = b.fmt("{} build-exe", .{annotated_case_name});
exe.linkLibC();
const run = exe.run();