authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-08-09 21:03:34+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-08-15 10:55:46+02:00
logb24fc35eeb417e660f4fed017d45c534bd794469
tree0baacf126479e801962301cfef9b54bf3f169911
parent8516a6ab571238527e460423dac30671c6380880
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.Target: Don't match big endian architectures in Arch.toCoffMachine().

All of these were mapping to types that are little endian. In fact, I can find no evidence that either Windows or UEFI have ever been used on big endian systems.

1 files changed, 6 insertions(+), 3 deletions(-)

lib/std/Target.zig+6-3
......@@ -1253,11 +1253,11 @@ pub const Cpu = struct {
12531253 pub fn toCoffMachine(arch: Arch) std.coff.MachineType {
12541254 return switch (arch) {
12551255 .arm => .ARM,
1256 .thumb, .thumbeb => .Thumb,
1257 .aarch64, .aarch64_be => .ARM64,
1256 .thumb => .Thumb,
1257 .aarch64 => .ARM64,
12581258 .loongarch32 => .LOONGARCH32,
12591259 .loongarch64 => .LOONGARCH64,
1260 .powerpc, .powerpcle => .POWERPC,
1260 .powerpcle => .POWERPC,
12611261 .riscv32 => .RISCV32,
12621262 .riscv64 => .RISCV64,
12631263 .x86 => .I386,
......@@ -1266,6 +1266,8 @@ pub const Cpu = struct {
12661266 .amdgcn,
12671267 .arc,
12681268 .armeb,
1269 .thumbeb,
1270 .aarch64_be,
12691271 .avr,
12701272 .bpfel,
12711273 .bpfeb,
......@@ -1282,6 +1284,7 @@ pub const Cpu = struct {
12821284 .msp430,
12831285 .nvptx,
12841286 .nvptx64,
1287 .powerpc,
12851288 .powerpc64,
12861289 .powerpc64le,
12871290 .s390x,