[Lldb-commits] [PATCH] D80257: [lldb] Allows customizing libxml2 for darwin

Haibo Huang via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue May 19 16:34:48 PDT 2020


hhb updated this revision to Diff 265080.
hhb added a comment.

Remove endif()


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80257

Files:
  lldb/cmake/modules/LLDBConfig.cmake
  lldb/source/Host/CMakeLists.txt
  lldb/source/Plugins/Platform/MacOSX/CMakeLists.txt
  lldb/source/Plugins/Process/gdb-remote/CMakeLists.txt
  lldb/source/Plugins/SymbolVendor/MacOSX/CMakeLists.txt


Index: lldb/source/Plugins/SymbolVendor/MacOSX/CMakeLists.txt
===================================================================
--- lldb/source/Plugins/SymbolVendor/MacOSX/CMakeLists.txt
+++ lldb/source/Plugins/SymbolVendor/MacOSX/CMakeLists.txt
@@ -1,5 +1,3 @@
-include_directories(${LIBXML2_INCLUDE_DIR})
-
 add_lldb_library(lldbPluginSymbolVendorMacOSX PLUGIN
   SymbolVendorMacOSX.cpp
 
Index: lldb/source/Plugins/Process/gdb-remote/CMakeLists.txt
===================================================================
--- lldb/source/Plugins/Process/gdb-remote/CMakeLists.txt
+++ lldb/source/Plugins/Process/gdb-remote/CMakeLists.txt
@@ -6,10 +6,6 @@
   SOURCE ProcessGDBRemoteProperties.td
   TARGET LLDBPluginProcessGDBRemotePropertiesEnumGen)
 
-if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
-  include_directories(${LIBXML2_INCLUDE_DIR})
-endif()
-
 set(LLDB_PLUGINS
   lldbPluginProcessUtility
   lldbPluginPlatformMacOSX
Index: lldb/source/Plugins/Platform/MacOSX/CMakeLists.txt
===================================================================
--- lldb/source/Plugins/Platform/MacOSX/CMakeLists.txt
+++ lldb/source/Plugins/Platform/MacOSX/CMakeLists.txt
@@ -25,7 +25,6 @@
   )
 
 if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
-  include_directories(${LIBXML2_INCLUDE_DIR})
   add_subdirectory(objcxx)
   set(OBJC_LIBS "lldbPluginPlatformMacOSXObjCXX")
   list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES
Index: lldb/source/Host/CMakeLists.txt
===================================================================
--- lldb/source/Host/CMakeLists.txt
+++ lldb/source/Host/CMakeLists.txt
@@ -83,7 +83,6 @@
     )
 
   if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
-    include_directories(SYSTEM ${LIBXML2_INCLUDE_DIR})
     add_subdirectory(macosx/objcxx)
     set(LLDBObjCLibs lldbHostMacOSXObjCXX)
     add_host_subdirectory(macosx
@@ -137,14 +136,10 @@
 set(EXTRA_LIBS)
 if (CMAKE_SYSTEM_NAME MATCHES "NetBSD")
   list(APPEND EXTRA_LIBS kvm)
-endif ()
-if (APPLE)
-  list(APPEND EXTRA_LIBS xml2)
-else ()
-  if (LIBXML2_FOUND)
-    list(APPEND EXTRA_LIBS ${LIBXML2_LIBRARIES})
-  endif()
-endif ()
+endif()
+if (LLDB_ENABLE_LIBXML2)
+  list(APPEND EXTRA_LIBS ${LIBXML2_LIBRARIES})
+endif()
 if (HAVE_LIBDL)
   list(APPEND EXTRA_LIBS ${CMAKE_DL_LIBS})
 endif()
@@ -156,7 +151,7 @@
 endif()
 if (WIN32)
   list(APPEND LLDB_SYSTEM_LIBS psapi)
-endif ()
+endif()
 
 if (LLDB_ENABLE_LIBEDIT)
   list(APPEND LLDB_LIBEDIT_LIBS ${LibEdit_LIBRARIES})
Index: lldb/cmake/modules/LLDBConfig.cmake
===================================================================
--- lldb/cmake/modules/LLDBConfig.cmake
+++ lldb/cmake/modules/LLDBConfig.cmake
@@ -279,7 +279,6 @@
   find_library(FOUNDATION_LIBRARY Foundation)
   find_library(CORE_FOUNDATION_LIBRARY CoreFoundation)
   find_library(SECURITY_LIBRARY Security)
-  include_directories(${LIBXML2_INCLUDE_DIR})
 endif()
 
 if( WIN32 AND NOT CYGWIN )


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80257.265080.patch
Type: text/x-patch
Size: 2872 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200519/f5b66a15/attachment-0001.bin>


More information about the lldb-commits mailing list