[llvm-dev] Versioned dylibs and llvm-config

Bo Anderson via llvm-dev llvm-dev at lists.llvm.org
Mon Nov 25 08:50:10 PST 2019


Unless I’m mistaken, back under the autoconf system dylibs were shipped versioned (libLLVM-{VERSION}.dylib). Indeed this is what llvm-config looks for.

On the move to CMake however, this is no longer happens on macOS: https://github.com/llvm/llvm-project/blob/ab411801b82783eb7f652701ccfce81b16cf1811/llvm/cmake/modules/AddLLVM.cmake#L562 <https://github.com/llvm/llvm-project/blob/ab411801b82783eb7f652701ccfce81b16cf1811/llvm/cmake/modules/AddLLVM.cmake#L562>

However, llvm-config still explicitly looks for versioned dylibs: https://github.com/llvm/llvm-project/blob/bec37c3fc766a7b97f8c52c181c325fd47b75259/llvm/tools/llvm-config/llvm-config.cpp#L378 <https://github.com/llvm/llvm-project/blob/bec37c3fc766a7b97f8c52c181c325fd47b75259/llvm/tools/llvm-config/llvm-config.cpp#L378>

So my question is: which one is correct? Unless I’ve missed something, llvm-config doesn’t function properly on macOS under LLVM_BUILD_LLVM_DYLIB and hasn’t done so for a few years now. This has raised a few bug reports, most recently in Homebrew.

For reference, this issue has been mentioned a couple times:
- https://bugs.llvm.org/show_bug.cgi?id=40252 <https://bugs.llvm.org/show_bug.cgi?id=40252>
- as a (late) comment to https://reviews.llvm.org/D13841 <https://reviews.llvm.org/D13841>

Any thoughts?

Bo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191125/0b29b95a/attachment-0001.html>


More information about the llvm-dev mailing list