Skip to content

Conversation

AnthonyLatsis
Copy link
Contributor

Remove 'lldb-python-scripts' from LLVM_DISTRIBUTION_COMPONENTS when Python scripting is disabled. Otherwise we get

Specified distribution component 'lldb-python-scripts' doesn't have an install target

Remove 'lldb-python-scripts' from LLVM_DISTRIBUTION_COMPONENTS when
Python scripting is disabled. Otherwise we get

```
Specified distribution component 'lldb-python-scripts' doesn't have an install target
```
@llvmbot
Copy link
Member

llvmbot commented Sep 19, 2025

@llvm/pr-subscribers-lldb

Author: Anthony Latsis (AnthonyLatsis)

Changes

Remove 'lldb-python-scripts' from LLVM_DISTRIBUTION_COMPONENTS when Python scripting is disabled. Otherwise we get

Specified distribution component 'lldb-python-scripts' doesn't have an install target

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

1 Files Affected:

  • (modified) lldb/cmake/modules/LLDBConfig.cmake (+9)
diff --git a/lldb/cmake/modules/LLDBConfig.cmake b/lldb/cmake/modules/LLDBConfig.cmake
index 90db786a2b6e9..4b568d27c4709 100644
--- a/lldb/cmake/modules/LLDBConfig.cmake
+++ b/lldb/cmake/modules/LLDBConfig.cmake
@@ -191,6 +191,15 @@ 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)
+
+  # Remove lldb-python-scripts from distribution components.
+  # LLVM_DISTRIBUTION_COMPONENTS is set in a cache where LLDB_ENABLE_PYTHON does
+  # not yet have a value. We have to touch up LLVM_DISTRIBUTION_COMPONENTS after
+  # the fact.
+  if(LLVM_DISTRIBUTION_COMPONENTS)
+    list(REMOVE_ITEM LLVM_DISTRIBUTION_COMPONENTS lldb-python-scripts)
+    set(LLVM_DISTRIBUTION_COMPONENTS ${LLVM_DISTRIBUTION_COMPONENTS} CACHE STRING "" FORCE)
+  endif()
 endif()
 
 if (LLVM_EXTERNAL_CLANG_SOURCE_DIR)

Copy link
Member

@JDevlieghere JDevlieghere left a comment

Choose a reason for hiding this comment

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

Thanks!

@JDevlieghere JDevlieghere merged commit 1688011 into llvm:main Sep 19, 2025
11 checks passed
@JDevlieghere JDevlieghere deleted the jepa-main3 branch September 19, 2025 18:13
AnthonyLatsis added a commit to swiftlang/llvm-project that referenced this pull request Sep 19, 2025
Remove 'lldb-python-scripts' from LLVM_DISTRIBUTION_COMPONENTS when
Python scripting is disabled. Otherwise we get

```
Specified distribution component 'lldb-python-scripts' doesn't have an install target
```

(cherry picked from commit 1688011)
YixingZhang007 pushed a commit to YixingZhang007/llvm-project that referenced this pull request Sep 27, 2025
Remove 'lldb-python-scripts' from LLVM_DISTRIBUTION_COMPONENTS when
Python scripting is disabled. Otherwise we get

```
Specified distribution component 'lldb-python-scripts' doesn't have an install target
```
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