[PATCH] D87521: [MinGW][llvm-config] Use unversioned library name

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 12 14:47:48 PDT 2020


mstorsjo added a reviewer: hans.
mstorsjo added a subscriber: hans.
mstorsjo added a comment.

Ok, so if I read code correctly, the suffix gets added here: https://github.com/llvm/llvm-project/blob/9c651c231f3144f53e13cd0a1747589e1b2edccd/llvm/cmake/modules/AddLLVM.cmake#L599-L606

So it gets added within an `if (UNIX)` condition. Hence one shouldn't expect version suffix on DLLs built for windows, regardless of MSVC vs mingw. The prebuilt installers of LLVM for windows (targeting MSVC) would confirm this; they contain LLVM-C.dll and LTO.dll.

However the code here in llvm-config seems to add `LLVM_DYLIB_VERSION` in the filenames, regardless of that logic. So the right path forward, if I understand things correctly, would be to stop adding `LLVM_DYLIB_VERSION` into the expected filenames for any windows target, not only mingw.

I had an old msvc based build lying around, and there I see the same, I have unsuffixed DLLs, and if trying to run e.g. `llvm-config.exe --link-shared` I'm getting `llvm-config: error: LLVM-10svn.dll is missing`. So this change, if applied to MSVC configurations, would be correct there as well.

@hans - Does that sound right to you?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87521/new/

https://reviews.llvm.org/D87521



More information about the llvm-commits mailing list