authorgravatar for david@vortan.devDavid Rubin <david@vortan.dev> 2024-07-19 23:37:17-07:00
committergravatar for david@vortan.devDavid Rubin <david@vortan.dev> 2024-07-22 05:50:48-07:00
logfcff82feb2565b427349927624da85089f5e3601
tree5c7f5a4d916c7fe107f4cdddad67d71dfd775144
parent1fc42ed3e7ca0b74b54aaa827276d995d6c7c6cd
signaturelock-open Commit is signed but in an unrecognized format.

dev: add riscv64-linux support


1 files changed, 10 insertions(+), 0 deletions(-)

src/dev.zig+10
...@@ -26,6 +26,10 @@ pub const Env = enum {...@@ -26,6 +26,10 @@ pub const Env = enum {
26 /// - `zig build-* -fno-llvm -fno-lld -target x86_64-linux`26 /// - `zig build-* -fno-llvm -fno-lld -target x86_64-linux`
27 @"x86_64-linux",27 @"x86_64-linux",
2828
29 /// - sema
30 /// - `zig build-* -fno-llvm -fno-lld -target riscv64-linux`
31 @"riscv64-linux",
32
29 pub inline fn supports(comptime dev_env: Env, comptime feature: Feature) bool {33 pub inline fn supports(comptime dev_env: Env, comptime feature: Feature) bool {
30 return switch (dev_env) {34 return switch (dev_env) {
31 .full => true,35 .full => true,
...@@ -131,6 +135,12 @@ pub const Env = enum {...@@ -131,6 +135,12 @@ pub const Env = enum {
131 => true,135 => true,
132 else => Env.sema.supports(feature),136 else => Env.sema.supports(feature),
133 },137 },
138 .@"riscv64-linux" => switch (feature) {
139 .riscv64_backend,
140 .elf_linker,
141 => true,
142 else => Env.sema.supports(feature),
143 },
134 };144 };
135 }145 }
136146