[Lldb-commits] [lldb] r357287 - [CMake] Move link dependencies where they are used.
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Fri Mar 29 10:47:26 PDT 2019
Author: jdevlieghere
Date: Fri Mar 29 10:47:26 2019
New Revision: 357287
URL: http://llvm.org/viewvc/llvm-project?rev=357287&view=rev
Log:
[CMake] Move link dependencies where they are used.
The utility library shouldn't depend on curses, libedit or python. Move
curses to core, libedit to host and python to the python plugin.
Differential revision: https://reviews.llvm.org/D59970
Modified:
lldb/trunk/source/Core/CMakeLists.txt
lldb/trunk/source/Host/CMakeLists.txt
lldb/trunk/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt
lldb/trunk/source/Utility/CMakeLists.txt
Modified: lldb/trunk/source/Core/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/CMakeLists.txt?rev=357287&r1=357286&r2=357287&view=diff
==============================================================================
--- lldb/trunk/source/Core/CMakeLists.txt (original)
+++ lldb/trunk/source/Core/CMakeLists.txt Fri Mar 29 10:47:26 2019
@@ -1,10 +1,14 @@
set(LLDB_CURSES_LIBS)
+set(LLDB_LIBEDIT_LIBS)
if (NOT LLDB_DISABLE_CURSES)
list(APPEND LLDB_CURSES_LIBS ${CURSES_LIBRARIES})
if(LLVM_ENABLE_TERMINFO AND HAVE_TERMINFO)
list(APPEND LLDB_CURSES_LIBS ${TERMINFO_LIBS})
endif()
+ if (LLVM_BUILD_STATIC)
+ list(APPEND LLDB_CURSES_LIBS gpm)
+ endif()
endif()
add_lldb_library(lldbCore
Modified: lldb/trunk/source/Host/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/CMakeLists.txt?rev=357287&r1=357286&r2=357287&view=diff
==============================================================================
--- lldb/trunk/source/Host/CMakeLists.txt (original)
+++ lldb/trunk/source/Host/CMakeLists.txt Fri Mar 29 10:47:26 2019
@@ -101,7 +101,7 @@ else()
macosx/cfcpp/CFCString.cpp
)
if(IOS)
- set_property(SOURCE macosx/Host.mm APPEND PROPERTY
+ set_property(SOURCE macosx/Host.mm APPEND PROPERTY
COMPILE_DEFINITIONS "NO_XPC_SERVICES=1")
endif()
@@ -158,6 +158,13 @@ if (NOT LLDB_DISABLE_LIBEDIT)
list(APPEND EXTRA_LIBS ${libedit_LIBRARIES})
endif()
+if (NOT LLDB_DISABLE_LIBEDIT)
+ list(APPEND LLDB_LIBEDIT_LIBS ${libedit_LIBRARIES})
+ if (LLVM_BUILD_STATIC)
+ list(APPEND LLDB_SYSTEM_LIBS gpm)
+ endif()
+endif()
+
add_lldb_library(lldbHost
${HOST_SOURCES}
@@ -165,6 +172,7 @@ add_lldb_library(lldbHost
lldbUtility
${EXTRA_LIBS}
${LLDBObjCLibs}
+ ${LLDB_LIBEDIT_LIBS}
LINK_COMPONENTS
Object
Modified: lldb/trunk/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt?rev=357287&r1=357286&r2=357287&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt (original)
+++ lldb/trunk/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt Fri Mar 29 10:47:26 2019
@@ -23,6 +23,8 @@ add_lldb_library(lldbPluginScriptInterpr
lldbHost
lldbInterpreter
lldbTarget
+ ${PYTHON_LIBRARY}
+
LINK_COMPONENTS
Support
)
Modified: lldb/trunk/source/Utility/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/CMakeLists.txt?rev=357287&r1=357286&r2=357287&view=diff
==============================================================================
--- lldb/trunk/source/Utility/CMakeLists.txt (original)
+++ lldb/trunk/source/Utility/CMakeLists.txt Fri Mar 29 10:47:26 2019
@@ -1,46 +1,15 @@
set(LLDB_SYSTEM_LIBS)
-# Windows-only libraries
-if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
- list(APPEND LLDB_SYSTEM_LIBS
- ws2_32
- rpcrt4
- )
-endif ()
+list(APPEND LLDB_SYSTEM_LIBS ${system_libs})
-if (NOT LLDB_DISABLE_LIBEDIT)
- list(APPEND LLDB_SYSTEM_LIBS ${libedit_LIBRARIES})
-endif()
-if (NOT LLDB_DISABLE_CURSES)
- list(APPEND LLDB_SYSTEM_LIBS ${CURSES_LIBRARIES})
- if(LLVM_ENABLE_TERMINFO AND HAVE_TERMINFO)
- list(APPEND LLDB_SYSTEM_LIBS ${TERMINFO_LIBS})
- endif()
-endif()
+if (CMAKE_SYSTEM_NAME MATCHES "Windows")
+ list(APPEND LLDB_SYSTEM_LIBS ws2_32 rpcrt4)
+endif ()
if (NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB )
list(APPEND LLDB_SYSTEM_LIBS atomic)
endif()
-if(Backtrace_FOUND)
- list(APPEND LLDB_SYSTEM_LIBS ${Backtrace_LIBRARY})
-endif()
-
-if (NOT LLDB_DISABLE_PYTHON AND NOT LLVM_BUILD_STATIC)
- list(APPEND LLDB_SYSTEM_LIBS ${PYTHON_LIBRARY})
-endif()
-
-list(APPEND LLDB_SYSTEM_LIBS ${system_libs})
-
-if (LLVM_BUILD_STATIC)
- if (NOT LLDB_DISABLE_PYTHON)
- list(APPEND LLDB_SYSTEM_LIBS python2.7 util)
- endif()
- if (NOT LLDB_DISABLE_CURSES)
- list(APPEND LLDB_SYSTEM_LIBS gpm)
- endif()
-endif()
-
add_lldb_library(lldbUtility
ArchSpec.cpp
Args.cpp
More information about the lldb-commits
mailing list