[Lldb-commits] [PATCH] D80253: [lldb] Cleans up system_libs

2020-05-20 Thread Haibo Huang via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rG04daba967031: [lldb] Cleans up system_libs (authored by hhb).

Changed prior to commit:
  https://reviews.llvm.org/D80253?vs=265065=265327#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80253/new/

https://reviews.llvm.org/D80253

Files:
  lldb/cmake/modules/LLDBConfig.cmake
  lldb/source/Utility/CMakeLists.txt


Index: lldb/source/Utility/CMakeLists.txt
===
--- lldb/source/Utility/CMakeLists.txt
+++ 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)
Index: lldb/cmake/modules/LLDBConfig.cmake
===
--- lldb/cmake/modules/LLDBConfig.cmake
+++ lldb/cmake/modules/LLDBConfig.cmake
@@ -234,7 +234,6 @@
 endif()
 
 if (LLDB_ENABLE_LIBXML2)
-  list(APPEND system_libs ${LIBXML2_LIBRARIES})
   include_directories(${LIBXML2_INCLUDE_DIR})
 endif()
 
@@ -280,12 +279,7 @@
   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 @@
 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")


Index: lldb/source/Utility/CMakeLists.txt
===
--- lldb/source/Utility/CMakeLists.txt
+++ 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)
Index: lldb/cmake/modules/LLDBConfig.cmake
===
--- lldb/cmake/modules/LLDBConfig.cmake
+++ lldb/cmake/modules/LLDBConfig.cmake
@@ -234,7 +234,6 @@
 endif()
 
 if (LLDB_ENABLE_LIBXML2)
-  list(APPEND system_libs ${LIBXML2_LIBRARIES})
   include_directories(${LIBXML2_INCLUDE_DIR})
 endif()
 
@@ -280,12 +279,7 @@
   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 @@
 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")
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D80253: [lldb] Cleans up system_libs

2020-05-20 Thread Pavel Labath via Phabricator via lldb-commits
labath accepted this revision.
labath added a comment.
This revision is now accepted and ready to land.

Yes, that's definitely cleaner. Thanks.

Some of these could/should probably be moved up to lldbHost, but that's ok if 
you want to keep this NFC.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80253/new/

https://reviews.llvm.org/D80253



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D80253: [lldb] Cleans up system_libs

2020-05-19 Thread Haibo Huang via Phabricator via lldb-commits
hhb created this revision.
Herald added subscribers: lldb-commits, mgorny.
Herald added a project: LLDB.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D80253

Files:
  lldb/cmake/modules/LLDBConfig.cmake
  lldb/source/Utility/CMakeLists.txt


Index: lldb/source/Utility/CMakeLists.txt
===
--- lldb/source/Utility/CMakeLists.txt
+++ 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)
Index: lldb/cmake/modules/LLDBConfig.cmake
===
--- lldb/cmake/modules/LLDBConfig.cmake
+++ lldb/cmake/modules/LLDBConfig.cmake
@@ -234,7 +234,6 @@
 endif()
 
 if (LLDB_ENABLE_LIBXML2)
-  list(APPEND system_libs ${LIBXML2_LIBRARIES})
   include_directories(${LIBXML2_INCLUDE_DIR})
 endif()
 
@@ -280,12 +279,6 @@
   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()
 
@@ -296,11 +289,8 @@
 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")


Index: lldb/source/Utility/CMakeLists.txt
===
--- lldb/source/Utility/CMakeLists.txt
+++ 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)
Index: lldb/cmake/modules/LLDBConfig.cmake
===
--- lldb/cmake/modules/LLDBConfig.cmake
+++ lldb/cmake/modules/LLDBConfig.cmake
@@ -234,7 +234,6 @@
 endif()
 
 if (LLDB_ENABLE_LIBXML2)
-  list(APPEND system_libs ${LIBXML2_LIBRARIES})
   include_directories(${LIBXML2_INCLUDE_DIR})
 endif()
 
@@ -280,12 +279,6 @@
   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()
 
@@ -296,11 +289,8 @@
 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")
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits