[Lldb-commits] [PATCH] D12672: add a dependency on terminfo library if llvm uses it

Jeremi Piotrowski via lldb-commits lldb-commits at lists.llvm.org
Mon Sep 7 04:37:18 PDT 2015


jeremi.piotrowski created this revision.
jeremi.piotrowski added a subscriber: lldb-commits.

Ncurses related symbols can either all be found in libnurses or split between
libncurses and libtinfo. The main LLVM cmake scripts look for the setupterm
symbol and stores the library that has it in TERMINFO_LIBS. This covers the
split and unified ncurses case. LLDB uses symbols that can end up in libtinfo so
this library should be pulled in if it is found.

There is still an exotic case left where LLDB is configured with
-DLLDB_DISABLE_CURSES=NO and LLVM with -DLLVM_ENABLE_TERMINFO=NO but
misconfigurations will always be possible. Possibly a diagnostic could be added
for that.

This fixes bug 24693 (https://llvm.org/bugs/show_bug.cgi?id=24693).

http://reviews.llvm.org/D12672

Files:
  cmake/LLDBDependencies.cmake

Index: cmake/LLDBDependencies.cmake
===================================================================
--- cmake/LLDBDependencies.cmake
+++ cmake/LLDBDependencies.cmake
@@ -146,6 +146,11 @@
   endif()
   if (NOT LLDB_DISABLE_CURSES)
     list(APPEND LLDB_SYSTEM_LIBS panel ncurses)
+    if(LLVM_ENABLE_TERMINFO)
+      if(HAVE_TERMINFO)
+         list(APPEND LLDB_SYSTEM_LIBS ${TERMINFO_LIBS})
+      endif(HAVE_TERMINFO)
+    endif(LLVM_ENABLE_TERMINFO)
   endif()
 endif()
 # On FreeBSD backtrace() is provided by libexecinfo, not libc.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12672.34145.patch
Type: text/x-patch
Size: 540 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150907/d32c53dd/attachment.bin>


More information about the lldb-commits mailing list