You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
zig rc: Fix include directory detection when cross-compiling from certain host archs
Previously, resinator would use the host arch as the target arch when looking for windows-gnu include directories. However, Zig only thinks it can provide a libc for targets specified in the `std.zig.target.available_libcs` array, which only includes a few for windows-gnu. Therefore, when cross-compiling from a host architecture that doesn't have a windows-gnu target in the available_libcs list, resinator would fail to detect the MinGW include directories.
Now, the custom option `/:target` is passed to `zig rc` which is intended for the COFF object file target, but can be re-used for the include directory target as well. For the include directory target, resinator can get away with being a bit lossy in its conversion from coff.MachineType to Target.Cpu.Arch (to ensure that the target arch is within the set of available_libcs) since the include directories all resolve to `any-windows-any` in the end anyway (which is what Zig actually ships for MinGW).
Fixes the `windows_resources` standalone test failing when the host is, for example, `risc64-linux`.
0 commit comments