std.Target: Fix Arch.toElfMachine() for arc.

The arc tag means ARCv2.
This commit is contained in:
Alex Rønne Petersen 2024-08-09 19:57:09 +02:00
parent 9246c88031
commit 6c27cab5b3
No known key found for this signature in database

View File

@ -1209,9 +1209,10 @@ pub const Cpu = struct {
}
pub fn toElfMachine(arch: Arch) std.elf.EM {
// TODO: Return IAMCU for elfiamcu OS.
return switch (arch) {
.amdgcn => .AMDGPU,
.arc => .ARC,
.arc => .ARC_COMPACT2,
.arm, .armeb, .thumb, .thumbeb => .ARM,
.aarch64, .aarch64_be => .AARCH64,
.avr => .AVR,