diff options
author | Cristian Adam <cristian.adam@qt.io> | 2023-11-07 17:57:09 +0100 |
---|---|---|
committer | Cristian Adam <cristian.adam@qt.io> | 2023-11-15 13:47:46 +0000 |
commit | 3939ba93af8c6cc0dbd55cdb23a7c4c48539ac2a (patch) | |
tree | 47a98ac8c8cc881ecde48576c54fc50a812c9d9d | |
parent | f9e2942a80035f044916bd1ce3270381b5a438a3 (diff) |
qtcreatorcdbext: Deploy lldb on Windows
Starting with LLVM 17.0.1 we include lldb in the list of packages
compiled on Windows.
This commit deploys lldb.exe and its Python required machinery.
Fixes: QTCREATORBUG-14539
Change-Id: I7f44c537cbaf31bf2f065762bdc9a48dd5efc64d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
-rwxr-xr-x | scripts/build.py | 5 | ||||
-rw-r--r-- | src/libs/qtcreatorcdbext/CMakeLists.txt | 20 |
2 files changed, 24 insertions, 1 deletions
diff --git a/scripts/build.py b/scripts/build.py index 72c7d3571a..6cd795a744 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 07a5493de3..97307164f6 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() |