[Lldb-commits] [PATCH] D145020: Hoist debugserver arch-dep sources out of a side CMakeLists into the debugserver main CMakeLists

Jason Molenda via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Feb 28 16:52:28 PST 2023


jasonmolenda created this revision.
jasonmolenda added a reviewer: JDevlieghere.
jasonmolenda added a project: LLDB.
Herald added a subscriber: kristof.beyls.
Herald added a project: All.
jasonmolenda requested review of this revision.
Herald added a subscriber: lldb-commits.

There was historical reasons why having the debugserver architecture dependent files built in their own separate CMakeLists.txt file was necessary, but that isn't true any longer.  This patch puts them in the debugserver source/CMakeLists.txt to have them all organized in the same place.

I'm also considering removing the i386 and armv7 architecture dependent files; we haven't used these in years at Apple, although there may be open source contributors who are using lldb on older OSes.  I'll do that in a separate commit at some point, so we can roll it back if there are requests to keep this code around.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D145020

Files:
  lldb/tools/debugserver/source/CMakeLists.txt
  lldb/tools/debugserver/source/MacOSX/CMakeLists.txt


Index: lldb/tools/debugserver/source/MacOSX/CMakeLists.txt
===================================================================
--- lldb/tools/debugserver/source/MacOSX/CMakeLists.txt
+++ lldb/tools/debugserver/source/MacOSX/CMakeLists.txt
@@ -1,14 +0,0 @@
-list(APPEND SOURCES arm/DNBArchImpl.cpp arm64/DNBArchImplARM64.cpp)
-include_directories(${CURRENT_SOURCE_DIR}/arm ${CURRENT_SOURCE_DIR}/arm64)
-
-list(APPEND SOURCES i386/DNBArchImplI386.cpp x86_64/DNBArchImplX86_64.cpp)
-include_directories(${CURRENT_SOURCE_DIR}/i386 ${CURRENT_SOURCE_DIR}/x86_64)
-
-include_directories(..)
-
-include_directories(${LLDB_SOURCE_DIR}/tools/debugserver/source)
-add_library(lldbDebugserverArchSupport
-  ${SOURCES}
-  )
-
-set_target_properties(lldbDebugserverArchSupport PROPERTIES FOLDER "lldb libraries/debugserver")
Index: lldb/tools/debugserver/source/CMakeLists.txt
===================================================================
--- lldb/tools/debugserver/source/CMakeLists.txt
+++ lldb/tools/debugserver/source/CMakeLists.txt
@@ -2,8 +2,11 @@
 include(CheckLibraryExists)
 include_directories(${CMAKE_CURRENT_BINARY_DIR}/..)
 include_directories(${LLDB_SOURCE_DIR}/source)
-
 include_directories(MacOSX)
+include_directories(MacOSX/i386)
+include_directories(MacOSX/x86_64)
+include_directories(MacOSX/arm)
+include_directories(MacOSX/arm64)
 
 function(check_certificate identity result_valid)
   execute_process(
@@ -108,8 +111,6 @@
 
 find_library(SECURITY_LIBRARY Security)
 
-add_subdirectory(MacOSX)
-
 set(LLDB_CODESIGN_IDENTITY "" CACHE STRING
     "Identity override for debugserver; see 'Code Signing on macOS' in the documentation (Darwin only)")
 
@@ -227,6 +228,10 @@
   MacOSX/MachVMMemory.cpp
   MacOSX/MachVMRegion.cpp
   MacOSX/OsLogger.cpp
+  MacOSX/arm/DNBArchImpl.cpp
+  MacOSX/arm64/DNBArchImplARM64.cpp
+  MacOSX/i386/DNBArchImplI386.cpp
+  MacOSX/x86_64/DNBArchImplX86_64.cpp
   ${generated_mach_interfaces}
   ${DEBUGSERVER_VERS_GENERATED_FILE})
 
@@ -248,7 +253,6 @@
                       ${MOBILESERVICES_LIBRARY}
                       ${LOCKDOWN_LIBRARY}
                       ${CAROUSELSERVICES_LIBRARY}
-                      lldbDebugserverArchSupport
                       ${FOUNDATION_LIBRARY}
                       ${SECURITY_LIBRARY}
                       ${LIBCOMPRESSION}
@@ -313,7 +317,6 @@
                       INTERFACE ${COCOA_LIBRARY}
                       ${CORE_FOUNDATION_LIBRARY}
                       ${FOUNDATION_LIBRARY}
-                      lldbDebugserverArchSupport
                       ${SECURITY_LIBRARY}
                       ${LIBCOMPRESSION})
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145020.501334.patch
Type: text/x-patch
Size: 2619 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230301/4fc9e870/attachment.bin>


More information about the lldb-commits mailing list