[Lldb-commits] [lldb] r293696 - [CMake] Add explicit dependencies to plugins

Chris Bieneman via lldb-commits lldb-commits at lists.llvm.org
Tue Jan 31 14:13:00 PST 2017


Author: cbieneman
Date: Tue Jan 31 16:12:59 2017
New Revision: 293696

URL: http://llvm.org/viewvc/llvm-project?rev=293696&view=rev
Log:
[CMake] Add explicit dependencies to plugins

Summary:
This patch does two things. First it updates all the ABI plugins with accurate dependencies, and second it adds a tracking mechanism for add_lldb_library to denote plugin libraries, allowing us to build up a list of all the configured plugins.

This list of generated plugins will be used during generating liblldb so that we can link all the plugins into the library.

If this patch looks good I will update all the other plugins in subsequent patches.

Reviewers: labath, zturner

Subscribers: nemanjai, mgorny, lldb-commits, jgosnell

Differential Revision: https://reviews.llvm.org/D29348

Modified:
    lldb/trunk/cmake/modules/AddLLDB.cmake
    lldb/trunk/source/Plugins/ABI/MacOSX-arm/CMakeLists.txt
    lldb/trunk/source/Plugins/ABI/MacOSX-arm64/CMakeLists.txt
    lldb/trunk/source/Plugins/ABI/MacOSX-i386/CMakeLists.txt
    lldb/trunk/source/Plugins/ABI/SysV-arm/CMakeLists.txt
    lldb/trunk/source/Plugins/ABI/SysV-arm64/CMakeLists.txt
    lldb/trunk/source/Plugins/ABI/SysV-hexagon/CMakeLists.txt
    lldb/trunk/source/Plugins/ABI/SysV-i386/CMakeLists.txt
    lldb/trunk/source/Plugins/ABI/SysV-mips/CMakeLists.txt
    lldb/trunk/source/Plugins/ABI/SysV-mips64/CMakeLists.txt
    lldb/trunk/source/Plugins/ABI/SysV-ppc/CMakeLists.txt
    lldb/trunk/source/Plugins/ABI/SysV-ppc64/CMakeLists.txt
    lldb/trunk/source/Plugins/ABI/SysV-s390x/CMakeLists.txt
    lldb/trunk/source/Plugins/ABI/SysV-x86_64/CMakeLists.txt

Modified: lldb/trunk/cmake/modules/AddLLDB.cmake
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/AddLLDB.cmake?rev=293696&r1=293695&r2=293696&view=diff
==============================================================================
--- lldb/trunk/cmake/modules/AddLLDB.cmake (original)
+++ lldb/trunk/cmake/modules/AddLLDB.cmake Tue Jan 31 16:12:59 2017
@@ -21,13 +21,17 @@ function(add_lldb_library name)
   # only supported parameters to this macro are the optional
   # MODULE;SHARED;STATIC library type and source files
   cmake_parse_arguments(PARAM
-    "MODULE;SHARED;STATIC;OBJECT"
+    "MODULE;SHARED;STATIC;OBJECT;PLUGIN"
     ""
     "DEPENDS;LINK_LIBS;LINK_COMPONENTS"
     ${ARGN})
   llvm_process_sources(srcs ${PARAM_UNPARSED_ARGUMENTS})
   list(APPEND LLVM_LINK_COMPONENTS ${PARAM_LINK_COMPONENTS})
 
+  if(PARAM_PLUGIN)
+    set_property(GLOBAL APPEND PROPERTY LLDB_PLUGINS ${name})
+  endif()
+
   if (MSVC_IDE OR XCODE)
     string(REGEX MATCHALL "/[^/]+" split_path ${CMAKE_CURRENT_SOURCE_DIR})
     list(GET split_path -1 dir)

Modified: lldb/trunk/source/Plugins/ABI/MacOSX-arm/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/MacOSX-arm/CMakeLists.txt?rev=293696&r1=293695&r2=293696&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/MacOSX-arm/CMakeLists.txt (original)
+++ lldb/trunk/source/Plugins/ABI/MacOSX-arm/CMakeLists.txt Tue Jan 31 16:12:59 2017
@@ -1,3 +1,11 @@
-add_lldb_library(lldbPluginABIMacOSX_arm
+add_lldb_library(lldbPluginABIMacOSX_arm PLUGIN
   ABIMacOSX_arm.cpp
+
+  LINK_LIBS
+    lldbCore
+    lldbSymbol
+    lldbTarget
+    lldbPluginProcessUtility
+  LINK_COMPONENTS
+    Support
   )

Modified: lldb/trunk/source/Plugins/ABI/MacOSX-arm64/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/MacOSX-arm64/CMakeLists.txt?rev=293696&r1=293695&r2=293696&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/MacOSX-arm64/CMakeLists.txt (original)
+++ lldb/trunk/source/Plugins/ABI/MacOSX-arm64/CMakeLists.txt Tue Jan 31 16:12:59 2017
@@ -1,3 +1,10 @@
-add_lldb_library(lldbPluginABIMacOSX_arm64
+add_lldb_library(lldbPluginABIMacOSX_arm64 PLUGIN
   ABIMacOSX_arm64.cpp
+  
+  LINK_LIBS
+    lldbCore
+    lldbSymbol
+    lldbTarget
+  LINK_COMPONENTS
+    Support
   )

Modified: lldb/trunk/source/Plugins/ABI/MacOSX-i386/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/MacOSX-i386/CMakeLists.txt?rev=293696&r1=293695&r2=293696&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/MacOSX-i386/CMakeLists.txt (original)
+++ lldb/trunk/source/Plugins/ABI/MacOSX-i386/CMakeLists.txt Tue Jan 31 16:12:59 2017
@@ -1,3 +1,10 @@
-add_lldb_library(lldbPluginABIMacOSX_i386
+add_lldb_library(lldbPluginABIMacOSX_i386 PLUGIN
   ABIMacOSX_i386.cpp
+
+  LINK_LIBS
+    lldbCore
+    lldbSymbol
+    lldbTarget
+  LINK_COMPONENTS
+    Support
   )

Modified: lldb/trunk/source/Plugins/ABI/SysV-arm/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-arm/CMakeLists.txt?rev=293696&r1=293695&r2=293696&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/SysV-arm/CMakeLists.txt (original)
+++ lldb/trunk/source/Plugins/ABI/SysV-arm/CMakeLists.txt Tue Jan 31 16:12:59 2017
@@ -1,3 +1,11 @@
-add_lldb_library(lldbPluginABISysV_arm
+add_lldb_library(lldbPluginABISysV_arm PLUGIN
   ABISysV_arm.cpp
+
+  LINK_LIBS
+    lldbCore
+    lldbSymbol
+    lldbTarget
+    lldbPluginProcessUtility
+  LINK_COMPONENTS
+    Support
   )

Modified: lldb/trunk/source/Plugins/ABI/SysV-arm64/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-arm64/CMakeLists.txt?rev=293696&r1=293695&r2=293696&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/SysV-arm64/CMakeLists.txt (original)
+++ lldb/trunk/source/Plugins/ABI/SysV-arm64/CMakeLists.txt Tue Jan 31 16:12:59 2017
@@ -1,3 +1,10 @@
-add_lldb_library(lldbPluginABISysV_arm64
+add_lldb_library(lldbPluginABISysV_arm64 PLUGIN
   ABISysV_arm64.cpp
+
+  LINK_LIBS
+    lldbCore
+    lldbSymbol
+    lldbTarget
+  LINK_COMPONENTS
+    Support
   )

Modified: lldb/trunk/source/Plugins/ABI/SysV-hexagon/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-hexagon/CMakeLists.txt?rev=293696&r1=293695&r2=293696&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/SysV-hexagon/CMakeLists.txt (original)
+++ lldb/trunk/source/Plugins/ABI/SysV-hexagon/CMakeLists.txt Tue Jan 31 16:12:59 2017
@@ -1,3 +1,10 @@
-add_lldb_library(lldbPluginABISysV_hexagon
+add_lldb_library(lldbPluginABISysV_hexagon PLUGIN
   ABISysV_hexagon.cpp
+
+  LINK_LIBS
+    lldbCore
+    lldbSymbol
+    lldbTarget
+  LINK_COMPONENTS
+    Support
   )

Modified: lldb/trunk/source/Plugins/ABI/SysV-i386/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-i386/CMakeLists.txt?rev=293696&r1=293695&r2=293696&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/SysV-i386/CMakeLists.txt (original)
+++ lldb/trunk/source/Plugins/ABI/SysV-i386/CMakeLists.txt Tue Jan 31 16:12:59 2017
@@ -1,3 +1,10 @@
-add_lldb_library(lldbPluginABISysV_i386
+add_lldb_library(lldbPluginABISysV_i386 PLUGIN
   ABISysV_i386.cpp
+
+  LINK_LIBS
+    lldbCore
+    lldbSymbol
+    lldbTarget
+  LINK_COMPONENTS
+    Support
   )

Modified: lldb/trunk/source/Plugins/ABI/SysV-mips/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-mips/CMakeLists.txt?rev=293696&r1=293695&r2=293696&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/SysV-mips/CMakeLists.txt (original)
+++ lldb/trunk/source/Plugins/ABI/SysV-mips/CMakeLists.txt Tue Jan 31 16:12:59 2017
@@ -1,3 +1,10 @@
-add_lldb_library(lldbPluginABISysV_mips
+add_lldb_library(lldbPluginABISysV_mips PLUGIN
   ABISysV_mips.cpp
+
+  LINK_LIBS
+    lldbCore
+    lldbSymbol
+    lldbTarget
+  LINK_COMPONENTS
+    Support
   )

Modified: lldb/trunk/source/Plugins/ABI/SysV-mips64/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-mips64/CMakeLists.txt?rev=293696&r1=293695&r2=293696&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/SysV-mips64/CMakeLists.txt (original)
+++ lldb/trunk/source/Plugins/ABI/SysV-mips64/CMakeLists.txt Tue Jan 31 16:12:59 2017
@@ -1,3 +1,10 @@
-add_lldb_library(lldbPluginABISysV_mips64
+add_lldb_library(lldbPluginABISysV_mips64 PLUGIN
   ABISysV_mips64.cpp
+
+  LINK_LIBS
+    lldbCore
+    lldbSymbol
+    lldbTarget
+  LINK_COMPONENTS
+    Support
   )

Modified: lldb/trunk/source/Plugins/ABI/SysV-ppc/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-ppc/CMakeLists.txt?rev=293696&r1=293695&r2=293696&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/SysV-ppc/CMakeLists.txt (original)
+++ lldb/trunk/source/Plugins/ABI/SysV-ppc/CMakeLists.txt Tue Jan 31 16:12:59 2017
@@ -1,3 +1,10 @@
-add_lldb_library(lldbPluginABISysV_ppc
+add_lldb_library(lldbPluginABISysV_ppc PLUGIN
   ABISysV_ppc.cpp
+
+  LINK_LIBS
+    lldbCore
+    lldbSymbol
+    lldbTarget
+  LINK_COMPONENTS
+    Support
   )

Modified: lldb/trunk/source/Plugins/ABI/SysV-ppc64/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-ppc64/CMakeLists.txt?rev=293696&r1=293695&r2=293696&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/SysV-ppc64/CMakeLists.txt (original)
+++ lldb/trunk/source/Plugins/ABI/SysV-ppc64/CMakeLists.txt Tue Jan 31 16:12:59 2017
@@ -1,3 +1,10 @@
-add_lldb_library(lldbPluginABISysV_ppc64
+add_lldb_library(lldbPluginABISysV_ppc64 PLUGIN
   ABISysV_ppc64.cpp
+
+  LINK_LIBS
+    lldbCore
+    lldbSymbol
+    lldbTarget
+  LINK_COMPONENTS
+    Support
   )

Modified: lldb/trunk/source/Plugins/ABI/SysV-s390x/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-s390x/CMakeLists.txt?rev=293696&r1=293695&r2=293696&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/SysV-s390x/CMakeLists.txt (original)
+++ lldb/trunk/source/Plugins/ABI/SysV-s390x/CMakeLists.txt Tue Jan 31 16:12:59 2017
@@ -1,3 +1,10 @@
-add_lldb_library(lldbPluginABISysV_s390x
+add_lldb_library(lldbPluginABISysV_s390x PLUGIN
   ABISysV_s390x.cpp
+
+  LINK_LIBS
+    lldbCore
+    lldbSymbol
+    lldbTarget
+  LINK_COMPONENTS
+    Support
   )

Modified: lldb/trunk/source/Plugins/ABI/SysV-x86_64/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-x86_64/CMakeLists.txt?rev=293696&r1=293695&r2=293696&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/SysV-x86_64/CMakeLists.txt (original)
+++ lldb/trunk/source/Plugins/ABI/SysV-x86_64/CMakeLists.txt Tue Jan 31 16:12:59 2017
@@ -1,3 +1,10 @@
-add_lldb_library(lldbPluginABISysV_x86_64
+add_lldb_library(lldbPluginABISysV_x86_64 PLUGIN
   ABISysV_x86_64.cpp
+
+  LINK_LIBS
+    lldbCore
+    lldbSymbol
+    lldbTarget
+  LINK_COMPONENTS
+    Support
   )




More information about the lldb-commits mailing list