Skip to content

Commit 1de6f65

Browse files
authored
[lldb] Fix build when LLDB_ENABLE_PYTHON is OFF (#159665)
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.
1 parent 8cfbace commit 1de6f65

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lldb/cmake/modules/LLDBConfig.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,10 @@ if (LLDB_ENABLE_PYTHON)
187187
endif()
188188
option(LLDB_ENABLE_PYTHON_LIMITED_API "Force LLDB to only use the Python Limited API (requires SWIG 4.2 or later)"
189189
${default_enable_python_limited_api})
190+
else()
191+
# Even if Python scripting is disabled, we still need a Python interpreter to
192+
# build, for example to generate SBLanguages.h.
193+
find_package(Python3 COMPONENTS Interpreter REQUIRED)
190194
endif()
191195

192196
if (LLVM_EXTERNAL_CLANG_SOURCE_DIR)

0 commit comments

Comments
 (0)