From 482759079f423681928467bf0f68a755a1a1a087 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Tue, 8 Oct 2024 06:35:18 +0200 Subject: [PATCH] std.Target: Move the elfiamcu check under the x86 prong in toElfMachine(). --- lib/std/Target.zig | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/std/Target.zig b/lib/std/Target.zig index 0958ce589e..0969da1a50 100644 --- a/lib/std/Target.zig +++ b/lib/std/Target.zig @@ -925,8 +925,6 @@ pub const ObjectFormat = enum { }; pub fn toElfMachine(target: Target) std.elf.EM { - if (target.os.tag == .elfiamcu) return .IAMCU; - return switch (target.cpu.arch) { .amdgcn => .AMDGPU, .arc => .ARC_COMPACT, @@ -950,7 +948,7 @@ pub fn toElfMachine(target: Target) std.elf.EM { .sparc64 => .SPARCV9, .spu_2 => .SPU_2, .ve => .VE, - .x86 => .@"386", + .x86 => if (target.os.tag == .elfiamcu) .IAMCU else .@"386", .x86_64 => .X86_64, .xcore => .XCORE, .xtensa => .XTENSA,