ah, ok i ran into this as well but am only now realizing what was actually happening:
- the linker has an implementation of 'cvtres' which is responsible for converting
.res files into COFF .obj files before linking
- when CMake generates the Makefile, it adds an intermediary step where it combines object files using
ar before passing the result to the linker
llvm-ar and zig ar don't have the 'cvtres' capability, so this step fails with unknown file type for the .res file
i accidentally got around this by generating ninja build files instead of Makefiles, which doesn't do the object combining step and therefore passes the .res to the linker, which works
windres is unaffected by this because the ".res" it generates is actually a COFF object file that CMake uses the wrong extension for (it tells windres to generate an object file by passing -O coff, but keeps the name as .res)