Function toElfMachine [src]

Prototype

pub fn toElfMachine(target: Target) std.elf.EM

Parameters

target: Target

Source

pub fn toElfMachine(target: Target) std.elf.EM { return switch (target.cpu.arch) { .amdgcn => .AMDGPU, .arc => .ARC_COMPACT, .arm, .armeb, .thumb, .thumbeb => .ARM, .aarch64, .aarch64_be => .AARCH64, .avr => .AVR, .bpfel, .bpfeb => .BPF, .csky => .CSKY, .hexagon => .QDSP6, .kalimba => .CSR_KALIMBA, .lanai => .LANAI, .loongarch32, .loongarch64 => .LOONGARCH, .m68k => .@"68K", .mips, .mips64, .mipsel, .mips64el => .MIPS, .msp430 => .MSP430, .powerpc, .powerpcle => .PPC, .powerpc64, .powerpc64le => .PPC64, .propeller => .PROPELLER, .riscv32, .riscv64 => .RISCV, .s390x => .S390, .sparc => if (Target.sparc.featureSetHas(target.cpu.features, .v9)) .SPARC32PLUS else .SPARC, .sparc64 => .SPARCV9, .ve => .VE, .x86 => if (target.os.tag == .elfiamcu) .IAMCU else .@"386", .x86_64 => .X86_64, .xcore => .XCORE, .xtensa => .XTENSA, .nvptx, .nvptx64, .spirv, .spirv32, .spirv64, .wasm32, .wasm64, => .NONE, }; }