From 1cc6fb32efa98efb73fc4784cd915a8dd2b71c85 Mon Sep 17 00:00:00 2001 From: Bob Farrell Date: Wed, 7 May 2025 18:26:49 +0100 Subject: [PATCH] Fix Linux ARM compilation Use CPU arch to detect whether to use LLVM - self-hosted compiler is not currently ready for ARM. --- build.zig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build.zig b/build.zig index 91f5a58..afaf39d 100644 --- a/build.zig +++ b/build.zig @@ -7,7 +7,10 @@ const zmpl_build = @import("zmpl"); const Environment = enum { development, testing, production }; const builtin = @import("builtin"); -const use_llvm_default = builtin.os.tag != .linux; +const use_llvm_default = switch (builtin.cpu.arch) { + .x86, .x86_64 => builtin.os.tag != .linux, + else => true, +}; pub fn build(b: *std.Build) !void { const target = b.standardTargetOptions(.{});