authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-04-26 16:55:50+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-04-27 14:09:05+02:00
log386b869ec43dbc7f5f2da809ad43ee3056187107
tree54f7e0a33d221bcc30204736a7a8411ae1fb423a
parent3e7708b02b48595f004083b17a05363d9fb2fa57
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

compiler: Error if the user targets arc with -femit-bin.

LLVM can only produce assembly files for this target currently.

1 files changed, 4 insertions(+), 2 deletions(-)

src/main.zig+4-2
...@@ -3169,9 +3169,11 @@ fn buildOutputType(...@@ -3169,9 +3169,11 @@ fn buildOutputType(
31693169
3170 const target = main_mod.resolved_target.result;3170 const target = main_mod.resolved_target.result;
31713171
3172 if (target.cpu.arch.isNvptx()) {3172 if (target.cpu.arch == .arc or target.cpu.arch.isNvptx()) {
3173 if (emit_bin != .no and create_module.resolved_options.use_llvm) {3173 if (emit_bin != .no and create_module.resolved_options.use_llvm) {
3174 fatal("cannot emit PTX binary with the LLVM backend; only '-femit-asm' is supported", .{});3174 fatal("cannot emit {s} binary with the LLVM backend; only '-femit-asm' is supported", .{
3175 @tagName(target.cpu.arch),
3176 });
3175 }3177 }
3176 }3178 }
31773179