authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-10-31 01:31:44+01:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-10-31 01:31:44+01:00
log33715cb28f5cc73339798048c4e3a2737c72c68f
tree38dbf18fe7b9ec681a2091f1b740237406a1eb1a
parentf1f804e532e603a3f58d559d32a1c8120691d891
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

mingw: Fix COFF machine type selection for thumb-windows-gnu import libraries.


1 files changed, 1 insertions(+), 7 deletions(-)

src/mingw.zig+1-7
...@@ -283,13 +283,7 @@ pub fn buildImportLib(comp: *Compilation, lib_name: []const u8) !void {...@@ -283,13 +283,7 @@ pub fn buildImportLib(comp: *Compilation, lib_name: []const u8) !void {
283 const lib_final_path_z = try comp.global_cache_directory.joinZ(arena, &.{lib_final_path});283 const lib_final_path_z = try comp.global_cache_directory.joinZ(arena, &.{lib_final_path});
284 if (llvm_bindings.WriteImportLibrary(284 if (llvm_bindings.WriteImportLibrary(
285 def_final_path_z.ptr,285 def_final_path_z.ptr,
286 @intFromEnum(@as(std.coff.MachineType, switch (target.cpu.arch) {286 @intFromEnum(target.toCoffMachine()),
287 .arm, .armeb, .thumb, .thumbeb => .ARMNT,
288 .aarch64, .aarch64_be => .ARM64,
289 .x86 => .I386,
290 .x86_64 => .X64,
291 else => unreachable,
292 })),
293 lib_final_path_z.ptr,287 lib_final_path_z.ptr,
294 true,288 true,
295 )) {289 )) {