`$arch-w64-mingw32-windmc` is missing
We are missing $arch-w64-mingw32-windmc.
Maybe just a wrapper thing?
I'm not familiar with the windmc tool and whether there's anything corresponding among the LLVM tools. (We don't build binutils at all here, as binutils generally don't support windows on arm/aarch64 anyway.)
If there exists a corresponding LLVM tool, it should be enough to install it with a wrapper (like the windres one) for adapting the command line parameter syntax. If there doesn't exist a corresponding tool in LLVM, one has to write it first.
windmc is a replacement for microsofts message compiler mc.exe i dont think clang has anything similar as llvm-mc.exe seems to be a machine code parser. mc or windmc is used for linking in manifests and other message related stuff mc.exe related documentation here -> https://docs.microsoft.com/en-us/windows/win32/wes/message-compiler--mc-exe- and windmc here -> https://linux.die.net/man/1/windmc wine also has one called wmc https://www.systutorials.com/docs/linux/man/1-wmc/
Could maybe just get the code for windmc out of binutils to create a local one as it des not seem to specifically rely on gcc.
Most binutils tools don't rely on gcc itself, but they rely on libbfd which is the internal library of binutils - so it's not so straightforward to just extract windmc out of it. Wine's wmc might actually be easier to use standalone.
Earlier I used binutils objcopy/strip (before llvm-objcopy supported COFF), with a huge hack that masqueraded arm binaries as x86 before calling the binutils tools as binutils doesn't support arm on windows, but the operation of those tools didn't rely on any architecture specific bits, and then restored the right architecture type afterwards.
It would be easier to look into this if there'd be a smallish project that relies on using binutils' windmc, that one can test building, to see that a drop-in replacement of the tool works as intended.
Hmm aye it relies on bfd atleast from what i can glean. wines wmc might actually be better in that case.
Well allthough it is not directly stated wines wmc does seem to have a dependency on getopt and gettext.
Any news on this? Can I just copy all the files missing from llvm-mingw from other mingw-w64 builds? Will it work?
Any news on this? Can I just copy all the files missing from llvm-mingw from other mingw-w64 builds? Will it work?
It presumably would work yes.
But to make any sort of progress whatsoever, I'd at least need a small minimal example of a project that uses the tool, so that it contains example input files, build files (makefiles etc) that should how the tool is invoked to build those files, and a working app so that one can verify that whatever the tool produces actually works.
@jeremyd2019 - Are there any projects in msys2 mingw-packages where you'd run into the issue of windmc missing?
(And even with an example of using it, I'm not sure if the llvm ecosystem has anything corresponding to it, so it might require someone to actually reimplement it from scratch, unless there's some component that can be reused.)
I have not seen anything fail for lack of windmc. I thought I have seen things using it though. It may have been silently using windmc from msys2, and just working.
The only usage I remember seeing was https://github.com/msys2-contrib/cpython-mingw/commit/4f1841b7211dd4d9557a868525b5005e4d67e55e
Here's a usage I just came across where the project just shipped the output of Microsoft's MC because they couldn't find windmc (maybe it didn't exist yet?)
https://github.com/postgres/postgres/blob/master/src/bin/pgevent/README
Here's a package that's failing due to lack of windmc:
https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-devcon-git/PKGBUILD
Unfortunately it doesn't have makefiles, it's a Microsoft sample being built by the PKGBUILD script directly.
Here's another... https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-poco/011-cmake-mingw.patch#L18
aye and poco even builds no problem if windmc is present.
Build ReactOS needs this windmc
somebody finally got pywin32 building on mingw-w64 again, but it's failing with clang because of lack of windmc. https://github.com/msys2/MINGW-packages/pull/9750#issuecomment-939561761