File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -211,6 +211,19 @@ if (LLDB_ENABLE_PYTHON)
211211 set (LLDB_PYTHON_HOME "${PYTHON_HOME} " CACHE STRING
212212 "Path to use as PYTHONHOME in lldb. If a relative path is specified, it will be resolved at runtime relative to liblldb directory." )
213213 endif ()
214+ else ()
215+ # Even if Python scripting is disabled, we still need a Python interpreter to
216+ # build, for example to generate SBLanguages.h.
217+ find_package (Python3 COMPONENTS Interpreter REQUIRED)
218+
219+ # Remove lldb-python-scripts from distribution components.
220+ # LLVM_DISTRIBUTION_COMPONENTS is set in a cache where LLDB_ENABLE_PYTHON does
221+ # not yet have a value. We have to touch up LLVM_DISTRIBUTION_COMPONENTS after
222+ # the fact.
223+ if (LLVM_DISTRIBUTION_COMPONENTS)
224+ list (REMOVE_ITEM LLVM_DISTRIBUTION_COMPONENTS lldb-python-scripts)
225+ set (LLVM_DISTRIBUTION_COMPONENTS ${LLVM_DISTRIBUTION_COMPONENTS} CACHE STRING "" FORCE)
226+ endif ()
214227endif ()
215228
216229if (LLVM_EXTERNAL_CLANG_SOURCE_DIR)
You can’t perform that action at this time.
0 commit comments