mirror of
https://github.com/ziglang/zig.git
synced 2026-01-04 20:43:19 +00:00
Merge pull request #20969 from alexrp/llvm-unsup-targets
`llvm`: Fix hasLlvmSupport() for dxil, spirv[32,64], and kalimba.
This commit is contained in:
commit
61fbdebd61
@ -81,12 +81,14 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![]const u8 {
|
||||
.spirv => "spirv",
|
||||
.spirv32 => "spirv32",
|
||||
.spirv64 => "spirv64",
|
||||
.kalimba => "kalimba",
|
||||
.lanai => "lanai",
|
||||
.wasm32 => "wasm32",
|
||||
.wasm64 => "wasm64",
|
||||
.ve => "ve",
|
||||
.spu_2 => return error.@"LLVM backend does not support SPU Mark II",
|
||||
|
||||
.kalimba,
|
||||
.spu_2,
|
||||
=> unreachable, // Gated by hasLlvmSupport().
|
||||
};
|
||||
try llvm_triple.appendSlice(llvm_arch);
|
||||
try llvm_triple.appendSlice("-unknown-");
|
||||
@ -12083,14 +12085,16 @@ pub fn initializeLLVMTarget(arch: std.Target.Cpu.Arch) void {
|
||||
llvm.LLVMInitializeLoongArchAsmParser();
|
||||
},
|
||||
|
||||
// LLVM backends that have no initialization functions.
|
||||
// We don't currently support using these backends.
|
||||
.spirv,
|
||||
.spirv32,
|
||||
.spirv64,
|
||||
.kalimba,
|
||||
.dxil,
|
||||
=> {},
|
||||
|
||||
.spu_2 => unreachable, // LLVM does not support this backend
|
||||
// LLVM does does not have a backend for these.
|
||||
.kalimba,
|
||||
.spu_2,
|
||||
=> unreachable,
|
||||
}
|
||||
}
|
||||
|
||||
@ -119,7 +119,6 @@ pub fn hasLlvmSupport(target: std.Target, ofmt: std.Target.ObjectFormat) bool {
|
||||
.bpfel,
|
||||
.bpfeb,
|
||||
.csky,
|
||||
.dxil,
|
||||
.hexagon,
|
||||
.loongarch32,
|
||||
.loongarch64,
|
||||
@ -147,17 +146,23 @@ pub fn hasLlvmSupport(target: std.Target, ofmt: std.Target.ObjectFormat) bool {
|
||||
.xtensa,
|
||||
.nvptx,
|
||||
.nvptx64,
|
||||
.spirv,
|
||||
.spirv32,
|
||||
.spirv64,
|
||||
.kalimba,
|
||||
.lanai,
|
||||
.wasm32,
|
||||
.wasm64,
|
||||
.ve,
|
||||
=> true,
|
||||
|
||||
.spu_2 => false,
|
||||
// An LLVM backend exists but we don't currently support using it.
|
||||
.dxil,
|
||||
.spirv,
|
||||
.spirv32,
|
||||
.spirv64,
|
||||
=> false,
|
||||
|
||||
// No LLVM backend exists.
|
||||
.kalimba,
|
||||
.spu_2,
|
||||
=> false,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user