Author: Anthony Latsis Date: 2025-09-19T11:13:34-07:00 New Revision: 16880116c9a180e1dfed69be383d20e1efd8d3c1
URL: https://github.com/llvm/llvm-project/commit/16880116c9a180e1dfed69be383d20e1efd8d3c1 DIFF: https://github.com/llvm/llvm-project/commit/16880116c9a180e1dfed69be383d20e1efd8d3c1.diff LOG: [lldb] Fix Linux build when LLDB_ENABLE_PYTHON is OFF (#159825) 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 ``` Added: Modified: lldb/cmake/modules/LLDBConfig.cmake Removed: ################################################################################ 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) _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
