From 5060ab99c94dd8afc8b84e74fe4d050c88cdfc0a Mon Sep 17 00:00:00 2001 From: Jacob Young Date: Wed, 18 Jun 2025 10:59:09 -0400 Subject: aarch64: add new from scratch self-hosted backend --- src/dev.zig | 41 +++++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 14 deletions(-) (limited to 'src/dev.zig') diff --git a/src/dev.zig b/src/dev.zig index 4c602621ec..bf2d957c0d 100644 --- a/src/dev.zig +++ b/src/dev.zig @@ -25,13 +25,13 @@ pub const Env = enum { /// - `zig build-* -fno-emit-bin` sema, + /// - sema + /// - `zig build-* -fincremental -fno-llvm -fno-lld -target aarch64-linux --listen=-` + @"aarch64-linux", + /// - `zig build-* -ofmt=c` cbe, - /// - sema - /// - `zig build-* -fincremental -fno-llvm -fno-lld -target x86_64-linux --listen=-` - @"x86_64-linux", - /// - sema /// - `zig build-* -fincremental -fno-llvm -fno-lld -target powerpc(64)(le)-linux --listen=-` @"powerpc-linux", @@ -48,6 +48,10 @@ pub const Env = enum { /// - `zig build-* -fno-llvm -fno-lld -target wasm32-* --listen=-` wasm, + /// - sema + /// - `zig build-* -fincremental -fno-llvm -fno-lld -target x86_64-linux --listen=-` + @"x86_64-linux", + pub inline fn supports(comptime dev_env: Env, comptime feature: Feature) bool { return switch (dev_env) { .full => true, @@ -153,23 +157,22 @@ pub const Env = enum { => true, else => Env.ast_gen.supports(feature), }, - .cbe => switch (feature) { - .legalize, - .c_backend, - .c_linker, - => true, - else => Env.sema.supports(feature), - }, - .@"x86_64-linux" => switch (feature) { + .@"aarch64-linux" => switch (feature) { .build_command, .stdio_listen, .incremental, - .legalize, - .x86_64_backend, + .aarch64_backend, .elf_linker, => true, else => Env.sema.supports(feature), }, + .cbe => switch (feature) { + .legalize, + .c_backend, + .c_linker, + => true, + else => Env.sema.supports(feature), + }, .@"powerpc-linux" => switch (feature) { .build_command, .stdio_listen, @@ -199,6 +202,16 @@ pub const Env = enum { => true, else => Env.sema.supports(feature), }, + .@"x86_64-linux" => switch (feature) { + .build_command, + .stdio_listen, + .incremental, + .legalize, + .x86_64_backend, + .elf_linker, + => true, + else => Env.sema.supports(feature), + }, }; } -- cgit v1.2.3