[llvm] [LLVM][Cygwin] Fix llvm-config shared library names (PR #136599)

via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 21 16:52:20 PDT 2025


jeremyd2019 wrote:

For clarity, Cygwin currently makes

* bin:
   * cygclang-20.1.dll
   * cygclang-cpp-20.1.dll
   * cygLLVM-20.1.dll
   * cygRemarks-20.1.dll
* lib:
   * libclang.dll.a
   * libclang-cpp.dll.a
   * libLLVM.dll.a
   * libRemarks.dll.a

In order to link one of these, you'd want to use `-lLLVM` for example.  I think there's some facility to link directly to a .dll (I know there is for MinGW, so it probably works for Cygwin also), but it's preferable to link to an import library where one's available.  These llvm-config changes result in it giving `-lLLVM` as the output for `llvm-config --libs --shared`, where before it gave an error about not finding libLLVM-20.dll (see msys2/MSYS2-packages#5350).

On MSYS2 (which is a fork of Cygwin) the prefix is `msys-` instead of `cyg`, but is otherwise the same.

https://github.com/llvm/llvm-project/pull/136599


More information about the llvm-commits mailing list