[LLD][CMake][MSVC] Install PDBs alongside executables (#126680)

* Follows up on https://github.com/llvm/llvm-project/pull/120683
installing PDBs for LLD.
This commit is contained in:
Miguel A. Arroyo 2025-05-23 12:58:30 -07:00 committed by GitHub
parent 1590ef3dec
commit e100f54a03
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -58,6 +58,10 @@ macro(add_lld_tool name)
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
COMPONENT ${name}) 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) if(NOT CMAKE_CONFIGURATION_TYPES)
add_llvm_install_targets(install-${name} add_llvm_install_targets(install-${name}
DEPENDS ${name} DEPENDS ${name}