diff --git a/scripts/build.py b/scripts/build.py index 72c7d3571ad..6cd795a744f 100755 --- a/scripts/build.py +++ b/scripts/build.py @@ -245,7 +245,10 @@ def build_qtcreatorcdbext(args, paths): return if not os.path.exists(paths.qtcreatorcdbext_build): os.makedirs(paths.qtcreatorcdbext_build) - prefix_paths = [common.to_posix_path(os.path.abspath(fp)) for fp in args.prefix_paths] + prefix_paths = [os.path.abspath(fp) for fp in args.prefix_paths] + if paths.llvm: + prefix_paths += [paths.llvm] + prefix_paths = [common.to_posix_path(fp) for fp in prefix_paths] cmake_args = ['-DCMAKE_PREFIX_PATH=' + ';'.join(prefix_paths), '-DCMAKE_INSTALL_PREFIX=' + common.to_posix_path(paths.qtcreatorcdbext_install)] cmake_args += common_cmake_arguments(args) diff --git a/src/libs/qtcreatorcdbext/CMakeLists.txt b/src/libs/qtcreatorcdbext/CMakeLists.txt index 07a5493de34..97307164f65 100644 --- a/src/libs/qtcreatorcdbext/CMakeLists.txt +++ b/src/libs/qtcreatorcdbext/CMakeLists.txt @@ -201,4 +201,24 @@ if (_library_enabled) COMMAND "${CMAKE_COMMAND}" -E copy_if_different ${deployPythonFiles} "${output_binary_dir}/lib/qtcreatorcdbext${ArchSuffix}/" VERBATIM ) + + # Deploy lldb.exe and its Python dependency + find_package(Clang QUIET) + if (LLVM_TOOLS_BINARY_DIR AND LLVM_LIBRARY_DIRS) + foreach(lldb_file lldb.exe lldb-vscode.exe liblldb.dll python311.zip python311.dll) + if (EXISTS ${LLVM_TOOLS_BINARY_DIR}/${lldb_file}) + install(FILES ${LLVM_TOOLS_BINARY_DIR}/${lldb_file} + DESTINATION bin/clang/bin + COMPONENT qtcreatorcdbext) + endif() + endforeach() + + if (EXISTS ${LLVM_LIBRARY_DIRS}/site-packages) + install(DIRECTORY ${LLVM_LIBRARY_DIRS}/site-packages + DESTINATION bin/clang/lib + COMPONENT qtcreatorcdbext + PATTERN _lldb.cp311-win_amd64.pyd EXCLUDE) + endif() + endif() + endif()