commit 386b869ec43dbc7f5f2da809ad43ee3056187107 (tree) parent 3e7708b02b48595f004083b17a05363d9fb2fa57 Author: Alex Rønne Petersen <alex@alexrp.com> Date: Sat, 26 Apr 2025 16:55:50 +0200 compiler: Error if the user targets arc with -femit-bin. LLVM can only produce assembly files for this target currently. Diffstat:
| M | src/main.zig | | | 6 | ++++-- |
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/main.zig b/src/main.zig @@ -3169,9 +3169,11 @@ fn buildOutputType( const target = main_mod.resolved_target.result; - if (target.cpu.arch.isNvptx()) { + if (target.cpu.arch == .arc or target.cpu.arch.isNvptx()) { if (emit_bin != .no and create_module.resolved_options.use_llvm) { - fatal("cannot emit PTX binary with the LLVM backend; only '-femit-asm' is supported", .{}); + fatal("cannot emit {s} binary with the LLVM backend; only '-femit-asm' is supported", .{ + @tagName(target.cpu.arch), + }); } }