Author: Jonas Devlieghere
Date: 2026-02-25T05:00:51Z
New Revision: 138805ed8434ed372bccd2436f25f771f7518eaa

URL: 
https://github.com/llvm/llvm-project/commit/138805ed8434ed372bccd2436f25f771f7518eaa
DIFF: 
https://github.com/llvm/llvm-project/commit/138805ed8434ed372bccd2436f25f771f7518eaa.diff

LOG: [lldb] Limit Python include dir to ScriptInterpreterPython (NFC) (#183236)

Limit Python include dir to ScriptInterpreterPython and any library that
depends on it (i.e. liblldb), making it consistent with what we do for
Lua.

Added: 
    

Modified: 
    lldb/cmake/modules/LLDBConfig.cmake
    lldb/source/Plugins/ScriptInterpreter/Lua/CMakeLists.txt
    lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/lldb/cmake/modules/LLDBConfig.cmake 
b/lldb/cmake/modules/LLDBConfig.cmake
index 6ce4853cf4a44..42af86b57cfcc 100644
--- a/lldb/cmake/modules/LLDBConfig.cmake
+++ b/lldb/cmake/modules/LLDBConfig.cmake
@@ -173,8 +173,6 @@ if (LLDB_ENABLE_PYTHON)
     "Embed PYTHONHOME in the binary. If set to OFF, PYTHONHOME environment 
variable will be used to to locate Python."
     ${default_embed_python_home})
 
-  include_directories(${Python3_INCLUDE_DIRS})
-
   if (LLDB_EMBED_PYTHON_HOME)
     get_filename_component(PYTHON_HOME "${Python3_EXECUTABLE}" DIRECTORY)
     set(LLDB_PYTHON_HOME "${PYTHON_HOME}" CACHE STRING

diff  --git a/lldb/source/Plugins/ScriptInterpreter/Lua/CMakeLists.txt 
b/lldb/source/Plugins/ScriptInterpreter/Lua/CMakeLists.txt
index ecfc7648c7ce4..d3f3ef72a0bf9 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Lua/CMakeLists.txt
+++ b/lldb/source/Plugins/ScriptInterpreter/Lua/CMakeLists.txt
@@ -5,7 +5,8 @@ add_lldb_library(lldbPluginScriptInterpreterLua PLUGIN
   LINK_LIBS
     lldbCore
     lldbInterpreter
+    ${LUA_LIBRARIES}
   )
 
-target_include_directories(lldbPluginScriptInterpreterLua PUBLIC 
${LUA_INCLUDE_DIR})
-target_link_libraries(lldbPluginScriptInterpreterLua INTERFACE 
${LUA_LIBRARIES})
+  target_include_directories(lldbPluginScriptInterpreterLua
+    PUBLIC ${LUA_INCLUDE_DIR})

diff  --git a/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt 
b/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt
index f2ff38530a3f2..0b3428d8856fa 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt
@@ -48,3 +48,7 @@ add_lldb_library(lldbPluginScriptInterpreterPython PLUGIN
     ${Python3_LIBRARIES}
     ${LLDB_LIBEDIT_LIBS}
   )
+
+
+  target_include_directories(lldbPluginScriptInterpreterPython
+    PUBLIC ${Python3_INCLUDE_DIRS})


        
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to