https://github.com/JDevlieghere updated https://github.com/llvm/llvm-project/pull/182962
>From f0c7f815934bb4a8e3f39fa913345422af7c8d8e Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere <[email protected]> Date: Mon, 23 Feb 2026 16:03:45 -0800 Subject: [PATCH 1/2] [lldb] Merge interfaces into lldbPluginScriptInterpreterPython (NFC) Make the interfaces part of lldbPluginScriptInterpreterPython instead of putting them into their own static library. This avoids the need for an extra static archive and more importantly a bunch of code duplication between the two CMakeLists.txt. --- .../ScriptInterpreter/Python/CMakeLists.txt | 15 ++++-- .../Python/Interfaces/CMakeLists.txt | 46 ------------------- 2 files changed, 12 insertions(+), 49 deletions(-) delete mode 100644 lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/CMakeLists.txt diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt b/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt index 3d09cea464467..e7826a40fa823 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt +++ b/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt @@ -14,18 +14,27 @@ if(NOT LLDB_PYTHON_EXE_RELATIVE_PATH) endif() add_definitions(-DLLDB_PYTHON_EXE_RELATIVE_PATH="${LLDB_PYTHON_EXE_RELATIVE_PATH}") - if (LLDB_ENABLE_LIBEDIT) list(APPEND LLDB_LIBEDIT_LIBS LibEdit::LibEdit) endif() -add_subdirectory(Interfaces) - add_lldb_library(lldbPluginScriptInterpreterPython PLUGIN PythonDataObjects.cpp PythonReadline.cpp ScriptInterpreterPython.cpp + Interface/OperatingSystemPythonInterface.cpp + Interface/ScriptInterpreterPythonInterfaces.cpp + Interface/ScriptedFramePythonInterface.cpp + Interface/ScriptedFrameProviderPythonInterface.cpp + Interface/ScriptedPlatformPythonInterface.cpp + Interface/ScriptedProcessPythonInterface.cpp + Interface/ScriptedPythonInterface.cpp + Interface/ScriptedStopHookPythonInterface.cpp + Interface/ScriptedBreakpointPythonInterface.cpp + Interface/ScriptedThreadPlanPythonInterface.cpp + Interface/ScriptedThreadPythonInterface.cpp + LINK_COMPONENTS Support LINK_LIBS diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/CMakeLists.txt b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/CMakeLists.txt deleted file mode 100644 index 50569cdefaafa..0000000000000 --- a/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/CMakeLists.txt +++ /dev/null @@ -1,46 +0,0 @@ -if (APPLE AND LLVM_ENABLE_LOCAL_SUBMODULE_VISIBILITY) - # Work around an issue with the Python headers, which have a modular include - # inside an extern "C" block. - remove_module_flags() -endif() - -if(NOT LLDB_PYTHON_RELATIVE_PATH) - message(FATAL_ERROR "LLDB_PYTHON_RELATIVE_PATH is not set.") -endif() -add_definitions(-DLLDB_PYTHON_RELATIVE_LIBDIR="${LLDB_PYTHON_RELATIVE_PATH}") - -if(NOT LLDB_PYTHON_EXE_RELATIVE_PATH) - message(FATAL_ERROR "LLDB_PYTHON_EXE_RELATIVE_PATH is not set.") -endif() -add_definitions(-DLLDB_PYTHON_EXE_RELATIVE_PATH="${LLDB_PYTHON_EXE_RELATIVE_PATH}") - - -if (LLDB_ENABLE_LIBEDIT) - list(APPEND LLDB_LIBEDIT_LIBS LibEdit::LibEdit) -endif() - -add_lldb_library(lldbPluginScriptInterpreterPythonInterfaces PLUGIN - OperatingSystemPythonInterface.cpp - ScriptInterpreterPythonInterfaces.cpp - ScriptedFramePythonInterface.cpp - ScriptedFrameProviderPythonInterface.cpp - ScriptedPlatformPythonInterface.cpp - ScriptedProcessPythonInterface.cpp - ScriptedPythonInterface.cpp - ScriptedStopHookPythonInterface.cpp - ScriptedBreakpointPythonInterface.cpp - ScriptedThreadPlanPythonInterface.cpp - ScriptedThreadPythonInterface.cpp - - LINK_COMPONENTS - Support - LINK_LIBS - lldbCore - lldbHost - lldbInterpreter - lldbTarget - ${Python3_LIBRARIES} - ${LLDB_LIBEDIT_LIBS} - ) - - >From a3951f0bbdae0d9c619b4430f0fcfb5b149daf05 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere <[email protected]> Date: Mon, 23 Feb 2026 16:08:41 -0800 Subject: [PATCH 2/2] Fix typo --- .../ScriptInterpreter/Python/CMakeLists.txt | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt b/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt index e7826a40fa823..f2ff38530a3f2 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt +++ b/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt @@ -23,17 +23,17 @@ add_lldb_library(lldbPluginScriptInterpreterPython PLUGIN PythonReadline.cpp ScriptInterpreterPython.cpp - Interface/OperatingSystemPythonInterface.cpp - Interface/ScriptInterpreterPythonInterfaces.cpp - Interface/ScriptedFramePythonInterface.cpp - Interface/ScriptedFrameProviderPythonInterface.cpp - Interface/ScriptedPlatformPythonInterface.cpp - Interface/ScriptedProcessPythonInterface.cpp - Interface/ScriptedPythonInterface.cpp - Interface/ScriptedStopHookPythonInterface.cpp - Interface/ScriptedBreakpointPythonInterface.cpp - Interface/ScriptedThreadPlanPythonInterface.cpp - Interface/ScriptedThreadPythonInterface.cpp + Interfaces/OperatingSystemPythonInterface.cpp + Interfaces/ScriptInterpreterPythonInterfaces.cpp + Interfaces/ScriptedFramePythonInterface.cpp + Interfaces/ScriptedFrameProviderPythonInterface.cpp + Interfaces/ScriptedPlatformPythonInterface.cpp + Interfaces/ScriptedProcessPythonInterface.cpp + Interfaces/ScriptedPythonInterface.cpp + Interfaces/ScriptedStopHookPythonInterface.cpp + Interfaces/ScriptedBreakpointPythonInterface.cpp + Interfaces/ScriptedThreadPlanPythonInterface.cpp + Interfaces/ScriptedThreadPythonInterface.cpp LINK_COMPONENTS Support @@ -45,7 +45,6 @@ add_lldb_library(lldbPluginScriptInterpreterPython PLUGIN lldbInterpreter lldbTarget lldbValueObject - lldbPluginScriptInterpreterPythonInterfaces ${Python3_LIBRARIES} ${LLDB_LIBEDIT_LIBS} ) _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
