Fix Linux ARM compilation

Use CPU arch to detect whether to use LLVM - self-hosted compiler is not
currently ready for ARM.
This commit is contained in:
Bob Farrell 2025-05-07 18:26:49 +01:00
parent a298192bb0
commit 1cc6fb32ef

View File

@ -7,7 +7,10 @@ const zmpl_build = @import("zmpl");
const Environment = enum { development, testing, production }; const Environment = enum { development, testing, production };
const builtin = @import("builtin"); 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 { pub fn build(b: *std.Build) !void {
const target = b.standardTargetOptions(.{}); const target = b.standardTargetOptions(.{});