aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Rønne Petersen <alex@alexrp.com>2025-04-26 16:55:50 +0200
committerAlex Rønne Petersen <alex@alexrp.com>2025-04-27 14:09:05 +0200
commit386b869ec43dbc7f5f2da809ad43ee3056187107 (patch)
tree54f7e0a33d221bcc30204736a7a8411ae1fb423a /src
parent3e7708b02b48595f004083b17a05363d9fb2fa57 (diff)
downloadzig-386b869ec43dbc7f5f2da809ad43ee3056187107.tar.gz
zig-386b869ec43dbc7f5f2da809ad43ee3056187107.zip
compiler: Error if the user targets arc with -femit-bin.
LLVM can only produce assembly files for this target currently.
Diffstat (limited to 'src')
-rw-r--r--src/main.zig6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main.zig b/src/main.zig
index f05208324f..cac0c78163 100644
--- 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),
+ });
}
}