| ... | ... | @@ -174,6 +174,23 @@ pub fn exeFromCompiledC(ctx: *Cases, name: []const u8, target_query: std.Target. |
| 174 | 174 | } |
| 175 | 175 | |
| 176 | 176 | 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 | |
| 177 | 194 | ctx.cases.append(.{ |
| 178 | 195 | .name = name, |
| 179 | 196 | .target = target, |
| ... | ... | @@ -182,6 +199,8 @@ pub fn addObjLlvm(ctx: *Cases, name: []const u8, target: std.Build.ResolvedTarge |
| 182 | 199 | .output_mode = .Obj, |
| 183 | 200 | .deps = std.ArrayList(DepModule).init(ctx.arena), |
| 184 | 201 | .backend = .llvm, |
| 202 | .emit_bin = can_emit_bin, |
| 203 | .emit_asm = can_emit_asm, |
| 185 | 204 | }) catch @panic("out of memory"); |
| 186 | 205 | return &ctx.cases.items[ctx.cases.items.len - 1]; |
| 187 | 206 | } |