[Lldb-commits] [lldb] 04daba9 - [lldb] Cleans up system_libs
Haibo Huang via lldb-commits
lldb-commits at lists.llvm.org
Wed May 20 12:32:34 PDT 2020
Author: Haibo Huang
Date: 2020-05-20T12:30:08-07:00
New Revision: 04daba967031b7e3a72935613f23cb0051b56fc8
URL: https://github.com/llvm/llvm-project/commit/04daba967031b7e3a72935613f23cb0051b56fc8
DIFF: https://github.com/llvm/llvm-project/commit/04daba967031b7e3a72935613f23cb0051b56fc8.diff
LOG: [lldb] Cleans up system_libs
Summary:
Long long ago system_libs was appended to LLDB_SYSTEM_LIBS in
cmake/LLDBDependencies.cmake. After that file was removed, system_libs
is orphaned.
Currently the only user is source/Utility. Move the logic there and
remove system_libs.
Subscribers: mgorny, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D80253
Added:
Modified:
lldb/cmake/modules/LLDBConfig.cmake
lldb/source/Utility/CMakeLists.txt
Removed:
################################################################################
diff --git a/lldb/cmake/modules/LLDBConfig.cmake b/lldb/cmake/modules/LLDBConfig.cmake
index c63e5316ccfc..8465cfe3b7b7 100644
--- a/lldb/cmake/modules/LLDBConfig.cmake
+++ b/lldb/cmake/modules/LLDBConfig.cmake
@@ -234,7 +234,6 @@ if (LLDB_ENABLE_LZMA)
endif()
if (LLDB_ENABLE_LIBXML2)
- list(APPEND system_libs ${LIBXML2_LIBRARIES})
include_directories(${LIBXML2_INCLUDE_DIR})
endif()
@@ -280,12 +279,7 @@ if (APPLE)
find_library(FOUNDATION_LIBRARY Foundation)
find_library(CORE_FOUNDATION_LIBRARY CoreFoundation)
find_library(SECURITY_LIBRARY Security)
- list(APPEND system_libs
- ${FOUNDATION_LIBRARY}
- ${CORE_FOUNDATION_LIBRARY}
- ${CORE_SERVICES_LIBRARY}
- ${SECURITY_LIBRARY}
- ${DEBUG_SYMBOLS_LIBRARY})
+ include_directories(${LIBXML2_INCLUDE_DIR})
endif()
if( WIN32 AND NOT CYGWIN )
@@ -295,11 +289,8 @@ endif()
if(NOT PURE_WINDOWS)
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
find_package(Threads REQUIRED)
- list(APPEND system_libs ${CMAKE_THREAD_LIBS_INIT})
endif()
-list(APPEND system_libs ${CMAKE_DL_LIBS})
-
# Figure out if lldb could use lldb-server. If so, then we'll
# ensure we build lldb-server when an lldb target is being built.
if (CMAKE_SYSTEM_NAME MATCHES "Android|Darwin|FreeBSD|Linux|NetBSD|Windows")
diff --git a/lldb/source/Utility/CMakeLists.txt b/lldb/source/Utility/CMakeLists.txt
index 48456ef1e3b1..c89d4f9e0072 100644
--- a/lldb/source/Utility/CMakeLists.txt
+++ b/lldb/source/Utility/CMakeLists.txt
@@ -1,6 +1,19 @@
set(LLDB_SYSTEM_LIBS)
-list(APPEND LLDB_SYSTEM_LIBS ${system_libs})
+if (APPLE)
+ list(APPEND LLDB_SYSTEM_LIBS
+ ${FOUNDATION_LIBRARY}
+ ${CORE_FOUNDATION_LIBRARY}
+ ${CORE_SERVICES_LIBRARY}
+ ${SECURITY_LIBRARY}
+ ${DEBUG_SYMBOLS_LIBRARY})
+endif()
+
+if(NOT PURE_WINDOWS)
+ list(APPEND LLDB_SYSTEM_LIBS ${CMAKE_THREAD_LIBS_INIT})
+endif()
+
+list(APPEND LLDB_SYSTEM_LIBS ${CMAKE_DL_LIBS})
if (CMAKE_SYSTEM_NAME MATCHES "Windows")
list(APPEND LLDB_SYSTEM_LIBS ws2_32 rpcrt4)
More information about the lldb-commits
mailing list