[PATCH] D114437: [Support][CMake] Fix exposed absolute path dependency of terminfo library

xndcn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 29 16:31:53 PST 2021


xndcn added a comment.

In D114437#3157211 <https://reviews.llvm.org/D114437#3157211>, @compnerd wrote:

> I'm not sure that this is a good idea.  This now means that you can link against two different versions of this library - one when building LLVMSupport and one that any user linking against LLVMSupport happens to find in the library search path.  Consider someone explicitly providing a path to the terminfo library when configuring.  At the very least, the library search path should be propagated to ensure that the right version is used.

Thanks! I have updated the patch. In fact the library like "ZLIB::ZLIB" or "LibXML2" also dose not use absolute path, so I think we can use the same idea to wrap the libtinfo into an IMPORTED library "LibTerminfo" in CMake. In LLVMConfig.cmake, we can try to find LibTerminfo from the specific path as a "HINTS".


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

https://reviews.llvm.org/D114437



More information about the llvm-commits mailing list