zig/lib/compiler/resinator
Ryan Liptak 09f4e2d9d1 resinator: 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 will convert the MachineType to the relevant arch, or fail if there is no  equivalent arch/no support for detecting the includes for the MachineType (currently 64-bit Itanium and EBC).

Fixes the `windows_resources` standalone test failing when the host is, for example, `riscv64-linux`.
2025-06-28 19:52:18 -07:00
..
ani.zig
ast.zig resinator: Sync with upstream 2025-01-17 23:10:41 -08:00
bmp.zig resinator: Sync with upstream 2025-01-17 23:10:41 -08:00
cli.zig std.meta.intToEnum -> std.enums.fromInt 2025-05-13 07:28:41 +02:00
code_pages.zig resinator: Sync with upstream 2025-01-17 23:10:41 -08:00
comments.zig resinator: Sync with upstream 2025-01-17 23:10:41 -08:00
compile.zig chore(std.mem): Rename trimLeft and trimRight 2025-04-27 18:03:59 +09:00
cvtres.zig zig rc: Add COFF object file creation for CMake cross-compilation use case 2025-02-22 21:21:30 -05:00
disjoint_code_page.zig resinator: Sync with upstream 2025-01-17 23:10:41 -08:00
errors.zig resinator: Sync with upstream 2025-01-17 23:10:41 -08:00
ico.zig std: update std.builtin.Type fields to follow naming conventions 2024-08-28 08:39:59 +01:00
lang.zig zig build fmt 2025-02-22 17:09:20 -08:00
lex.zig resinator: Sync with upstream 2025-01-17 23:10:41 -08:00
literals.zig resinator: Sync with upstream 2025-01-17 23:10:41 -08:00
main.zig resinator: Fix include directory detection when cross-compiling from certain host archs 2025-06-28 19:52:18 -07:00
parse.zig resinator: Sync with upstream 2025-01-17 23:10:41 -08:00
preprocess.zig resinator: Sync with upstream 2025-01-17 23:10:41 -08:00
rc.zig resinator: Sync with upstream 2025-01-17 23:10:41 -08:00
res.zig std.meta.intToEnum -> std.enums.fromInt 2025-05-13 07:28:41 +02:00
source_mapping.zig resinator: Sync with upstream 2025-01-17 23:10:41 -08:00
utils.zig Integrate resinator errors with Zig using std.zig.Server and ErrorBundle 2024-03-11 05:06:16 -07:00
windows1252.zig