mirror of
https://github.com/ziglang/zig.git
synced 2026-01-30 03:03:46 +00:00
std.Target: Add Arch.isLoongArch() function.
This commit is contained in:
parent
624fa8523a
commit
5e08d00862
@ -1084,6 +1084,13 @@ pub const Cpu = struct {
|
||||
};
|
||||
}
|
||||
|
||||
pub inline fn isLoongArch(arch: Arch) bool {
|
||||
return switch (arch) {
|
||||
.loongarch32, .loongarch64 => true,
|
||||
else => false,
|
||||
};
|
||||
}
|
||||
|
||||
pub inline fn isRISCV(arch: Arch) bool {
|
||||
return switch (arch) {
|
||||
.riscv32, .riscv64 => true,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user