[PATCH] D12488: Enable linking tools, shared libraries against libLLVM

Andrew Wilkins via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 1 16:50:03 PDT 2015


axw added a comment.

In http://reviews.llvm.org/D12488#237400, @beanz wrote:

> I still disagree with how this patch works, and there are some problems with it functionally too. For example, if you try to build clang, lld, or lldb with this it doesn't work at all, and even if it did, it would screw up the target dependencies, because llvm-shlib isn't processed by CMake until after clang, lld, and lldb.


I don't understand, can you please elaborate on that? I built clang and lldb (not lld though; I should have), and they do work with the new option. Did you try them and find an issue? Please revert if it's actively breaking things, and let me know what needs fixing.

> I've also been thinking more about how this patch works, and I think it is implemented wrong. We should push all of this down into the `llvm_config` CMake functionality, and we should probably find a way to bake this behavior into the llvm-config executable and installed CMake files so that people using distributions of LLVM get the right behavior too.


I did think about that, and the problem there is that the way the existing build scripts work is: call into LLVM-Config.cmake to translate a list of component names to library names, and pass them through target_link_libraries. Making this change would have been *much* more invasive, requiring touching all the CMakeLists.txts.


http://reviews.llvm.org/D12488





More information about the llvm-commits mailing list