[Lldb-commits] [lldb] r247842 - add a dependency on terminfo library if llvm uses it

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Wed Sep 16 13:14:01 PDT 2015


Author: zturner
Date: Wed Sep 16 15:14:01 2015
New Revision: 247842

URL: http://llvm.org/viewvc/llvm-project?rev=247842&view=rev
Log:
add a dependency on terminfo library if llvm uses it

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.

Differential Revision: http://reviews.llvm.org/D12672
Patch by Jeremi Piotrowski

Modified:
    lldb/trunk/cmake/LLDBDependencies.cmake

Modified: lldb/trunk/cmake/LLDBDependencies.cmake
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/LLDBDependencies.cmake?rev=247842&r1=247841&r2=247842&view=diff
==============================================================================
--- lldb/trunk/cmake/LLDBDependencies.cmake (original)
+++ lldb/trunk/cmake/LLDBDependencies.cmake Wed Sep 16 15:14:01 2015
@@ -141,6 +141,9 @@ if (NOT CMAKE_SYSTEM_NAME MATCHES "Windo
   endif()
   if (NOT LLDB_DISABLE_CURSES)
     list(APPEND LLDB_SYSTEM_LIBS panel ncurses)
+    if(LLVM_ENABLE_TERMINFO AND HAVE_TERMINFO)
+      list(APPEND LLDB_SYSTEM_LIBS ${TERMINFO_LIBS})
+    endif()
   endif()
 endif()
 # On FreeBSD backtrace() is provided by libexecinfo, not libc.




More information about the lldb-commits mailing list