[lld] e100f54 - [LLD][CMake][MSVC] Install PDBs alongside executables (#126680)
via llvm-commits
llvm-commits at lists.llvm.org
Fri May 23 12:58:33 PDT 2025
Author: Miguel A. Arroyo
Date: 2025-05-23T12:58:30-07:00
New Revision: e100f54a0342c2c44974b34254eebf23b8a6339c
URL: https://github.com/llvm/llvm-project/commit/e100f54a0342c2c44974b34254eebf23b8a6339c
DIFF: https://github.com/llvm/llvm-project/commit/e100f54a0342c2c44974b34254eebf23b8a6339c.diff
LOG: [LLD][CMake][MSVC] Install PDBs alongside executables (#126680)
* Follows up on https://github.com/llvm/llvm-project/pull/120683
installing PDBs for LLD.
Added:
Modified:
lld/cmake/modules/AddLLD.cmake
Removed:
################################################################################
diff --git a/lld/cmake/modules/AddLLD.cmake b/lld/cmake/modules/AddLLD.cmake
index 1de373ff860c4..37f73afa915f4 100644
--- a/lld/cmake/modules/AddLLD.cmake
+++ b/lld/cmake/modules/AddLLD.cmake
@@ -58,6 +58,10 @@ macro(add_lld_tool name)
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
COMPONENT ${name})
+ if (LLVM_ENABLE_PDB)
+ install(FILES $<TARGET_PDB_FILE:${name}> DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${name} OPTIONAL)
+ endif()
+
if(NOT CMAKE_CONFIGURATION_TYPES)
add_llvm_install_targets(install-${name}
DEPENDS ${name}
More information about the llvm-commits
mailing list