On Wed, 10 Feb 2021, Jacek Caban wrote:
I had another look at it and I sent the part that replaces use of llvm-ar and llvm-ranlib with lld-link /lib. However, I couldn't get importlibs using lld-link -implib right. I tried MSVC, suspecting that something is wrong with lld-link, but I found that what I was trying to do is not supported by link.exe. -implib option is really meant for an addition to linker, not for importlib-only execution.
It does seem to work for me, e.g. like this:
link.exe -lib -machine:arm64 -def:test.def -out:test.lib
However lld-link doesn't implement that combination, so you're right that llvm-dlltool is the one we have to use for now. I guess I should look into implementing that option combination at some point though.
// Martin