Commit 26bb429093

Alex Rønne Petersen <alex@alexrp.com>
2025-04-26 16:59:40
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.
1 parent 386b869
Changed files (1)
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,