From 32c1e58701afba62d6058ed6a491971553da2dd1 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Thu, 18 Sep 2025 15:32:28 -0700 Subject: [PATCH] [lldb] Fix build when LLDB_ENABLE_PYTHON is OFF Even if Python scripting is disabled, we still need a Python interpreter to build, for example to generate SBLanguages.h or fix up the framework headers. --- lldb/cmake/modules/LLDBConfig.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lldb/cmake/modules/LLDBConfig.cmake b/lldb/cmake/modules/LLDBConfig.cmake index c65c7e24badd9..90db786a2b6e9 100644 --- a/lldb/cmake/modules/LLDBConfig.cmake +++ b/lldb/cmake/modules/LLDBConfig.cmake @@ -187,6 +187,10 @@ if (LLDB_ENABLE_PYTHON) endif() option(LLDB_ENABLE_PYTHON_LIMITED_API "Force LLDB to only use the Python Limited API (requires SWIG 4.2 or later)" ${default_enable_python_limited_api}) +else() + # Even if Python scripting is disabled, we still need a Python interpreter to + # build, for example to generate SBLanguages.h. + find_package(Python3 COMPONENTS Interpreter REQUIRED) endif() if (LLVM_EXTERNAL_CLANG_SOURCE_DIR)