MinGW-w64 [1] (Windows GCC distro -- not the older and dead original MinGW) outputs object files in the MS COFF format. In my simple test builds, both 32- and 64-bit objects are compatible with DMD and the MS linker. Unfortunately, DMD rejects objects with the .o extension on Windows out of hand. They must first be renamed to .obj.
Given that the files are compatible, accepting them based on their format rather than their file extension would add a bit of convenience.
The same can be said of library files with the .a extension. DMD rejects them out of hand but accepts them when they're renamed to .lib.
There's no reason for DMD to filter "*.o" out, especially since the compiler does nothing with them but passing them to the linker, which then presumably checks the file headers in details.
lld-link also accepts "*.o" files BTW.
Comment #3 by robert.schadek — 2024-12-13T19:04:56Z