Skip to content

Conversation

JDevlieghere
Copy link
Member

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.

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.
@llvmbot
Copy link
Member

llvmbot commented Sep 18, 2025

@llvm/pr-subscribers-lldb

Author: Jonas Devlieghere (JDevlieghere)

Changes

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.


Full diff: https://github.com/llvm/llvm-project/pull/159665.diff

1 Files Affected:

  • (modified) lldb/cmake/modules/LLDBConfig.cmake (+4)
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)

Copy link
Collaborator

@adrian-prantl adrian-prantl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable.

@JDevlieghere JDevlieghere enabled auto-merge (squash) September 18, 2025 22:37
@JDevlieghere JDevlieghere merged commit 1de6f65 into llvm:main Sep 18, 2025
11 checks passed
@JDevlieghere JDevlieghere deleted the lldb-no-python branch September 18, 2025 22:45
AnthonyLatsis pushed a commit to swiftlang/llvm-project that referenced this pull request Sep 19, 2025
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.

(cherry picked from commit 1de6f65)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants