Skip to content

Commit 4eb7d0c

Browse files
committed
test: Configure emit_asm/emit_bin correctly for some targets in llvm_targets.
1 parent 5b5c8da commit 4eb7d0c

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

test/src/Cases.zig

+19
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,23 @@ pub fn exeFromCompiledC(ctx: *Cases, name: []const u8, target_query: std.Target.
174174
}
175175

176176
pub fn addObjLlvm(ctx: *Cases, name: []const u8, target: std.Build.ResolvedTarget) *Case {
177+
const can_emit_asm = switch (target.result.cpu.arch) {
178+
.csky,
179+
.xtensa,
180+
=> false,
181+
else => true,
182+
};
183+
const can_emit_bin = switch (target.result.cpu.arch) {
184+
.arc,
185+
.csky,
186+
.nvptx,
187+
.nvptx64,
188+
.xcore,
189+
.xtensa,
190+
=> false,
191+
else => true,
192+
};
193+
177194
ctx.cases.append(.{
178195
.name = name,
179196
.target = target,
@@ -182,6 +199,8 @@ pub fn addObjLlvm(ctx: *Cases, name: []const u8, target: std.Build.ResolvedTarge
182199
.output_mode = .Obj,
183200
.deps = std.ArrayList(DepModule).init(ctx.arena),
184201
.backend = .llvm,
202+
.emit_bin = can_emit_bin,
203+
.emit_asm = can_emit_asm,
185204
}) catch @panic("out of memory");
186205
return &ctx.cases.items[ctx.cases.items.len - 1];
187206
}

0 commit comments

Comments
 (0)