Skip to content

Commit b7a830b

Browse files
committed
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 3ad1cea commit b7a830b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/target.zig

+5-2
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ pub fn hasLlvmSupport(target: std.Target, ofmt: std.Target.ObjectFormat) bool {
153153
.avr,
154154
.bpfel,
155155
.bpfeb,
156-
.csky,
157156
.hexagon,
158157
.loongarch32,
159158
.loongarch64,
@@ -181,7 +180,6 @@ pub fn hasLlvmSupport(target: std.Target, ofmt: std.Target.ObjectFormat) bool {
181180
.x86,
182181
.x86_64,
183182
.xcore,
184-
.xtensa,
185183
.nvptx,
186184
.nvptx64,
187185
.lanai,
@@ -190,6 +188,11 @@ pub fn hasLlvmSupport(target: std.Target, ofmt: std.Target.ObjectFormat) bool {
190188
.ve,
191189
=> true,
192190

191+
// LLVM backend exists but can produce neither assembly nor object files.
192+
.csky,
193+
.xtensa,
194+
=> false,
195+
193196
// No LLVM backend exists.
194197
.kalimba,
195198
.propeller,

0 commit comments

Comments
 (0)