aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Rønne Petersen <alex@alexrp.com>2025-04-26 16:59:40 +0200
committerAlex Rønne Petersen <alex@alexrp.com>2025-04-27 14:09:05 +0200
commit26bb429093141e70e136da1f7861e2d6473328df (patch)
tree0c6713d0df07089b5663330786b8748abb63576c /src
parent386b869ec43dbc7f5f2da809ad43ee3056187107 (diff)
downloadzig-26bb429093141e70e136da1f7861e2d6473328df.tar.gz
zig-26bb429093141e70e136da1f7861e2d6473328df.zip
compiler: Reject using LLVM for csky and xtensa.
These backends are completely unusable at the moment; they can produce neither assembly files nor object files. So give a nicer error when users try to use them.
Diffstat (limited to 'src')
-rw-r--r--src/target.zig7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/target.zig b/src/target.zig
index 2a2bffc572..7179868f42 100644
--- a/src/target.zig
+++ b/src/target.zig
@@ -153,7 +153,6 @@ pub fn hasLlvmSupport(target: std.Target, ofmt: std.Target.ObjectFormat) bool {
.avr,
.bpfel,
.bpfeb,
- .csky,
.hexagon,
.loongarch32,
.loongarch64,
@@ -181,7 +180,6 @@ pub fn hasLlvmSupport(target: std.Target, ofmt: std.Target.ObjectFormat) bool {
.x86,
.x86_64,
.xcore,
- .xtensa,
.nvptx,
.nvptx64,
.lanai,
@@ -190,6 +188,11 @@ pub fn hasLlvmSupport(target: std.Target, ofmt: std.Target.ObjectFormat) bool {
.ve,
=> true,
+ // LLVM backend exists but can produce neither assembly nor object files.
+ .csky,
+ .xtensa,
+ => false,
+
// No LLVM backend exists.
.kalimba,
.propeller,