[Lldb-commits] [lldb] [lldb] Add terminfo dependency for ncurses support (PR #126810)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Wed Feb 12 10:25:49 PST 2025


JDevlieghere wrote:

> I understand the issue in point two--this patch may unnecessarily require a separate tinfo library even when the headers and objects are available via ncurses. But could you explain more on your recommended solutions, particularly on why we would need to set an optional variable?
> 
> If we're going to require a CMAKE flag anyways to show a warning, why not just guard it on a `LLDB_USE_SEPARATE_TERMINFO=ON` flag and not worry about autodetection? It's already breaking with a link time error, surely that's a louder signal than a configure-time warning.

Yes, you could do that, but then platforms that have a separate `terminfo` library need to remember to turn this on. If they don't they'll hit the link time warning you mentioned and then need to remember or find the appropriate variable. The advantage of the auto detection is that it works out of the box: if CMake can find the library, we'll link against it, if not then we won't. Anyway, doing that means adding a module to find it, and maybe that's overkill for `terminfo` as it presumably only affects a small subset of platforms. So I'm fine with either. 

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


More information about the lldb-commits mailing list