From 15d9dd52d5a2572e5757291986a1607400d81ed5 Mon Sep 17 00:00:00 2001 From: Juan Hoyos <19413848+hoyosjs@users.noreply.github.com> Date: Mon, 7 Aug 2023 12:43:20 -0700 Subject: [PATCH] Update DAC's CMakeLists to create longname pdb --- src/coreclr/dlls/mscordac/CMakeLists.txt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/coreclr/dlls/mscordac/CMakeLists.txt b/src/coreclr/dlls/mscordac/CMakeLists.txt index 36124262f7f93..4b1ff24ccdceb 100644 --- a/src/coreclr/dlls/mscordac/CMakeLists.txt +++ b/src/coreclr/dlls/mscordac/CMakeLists.txt @@ -212,8 +212,15 @@ if(CLR_CMAKE_HOST_WIN32) string(REGEX MATCH "#define VER_FILEVERSION[ \t]+[0-9]+(,[0-9]+)+" FILE_VERSION_LINE "${NATIVE_VERSION_HEADER}") string(REGEX MATCHALL "[0-9]+" FILE_VERSION_COMPONENTS "${FILE_VERSION_LINE}") list(JOIN FILE_VERSION_COMPONENTS "." FILE_VERSION) - install(PROGRAMS $ RENAME mscordaccore_${LONG_NAME_HOST_ARCH}_${LONG_NAME_TARGET_ARCH}_${FILE_VERSION}.dll DESTINATION sharedFramework COMPONENT runtime) + + # This is unlike all other targets in the runtime, and is largely a long standing contract between + # debuggers and the runtime. This long form supports postmortem cross-architecture diagnostic scenarios. + # It doesn't make sense to complicate install_clr for this purpose, so keep it self-contained here. + set(LONG_NAME_BASE mscordaccore_${LONG_NAME_HOST_ARCH}_${LONG_NAME_TARGET_ARCH}_${FILE_VERSION}) + install(PROGRAMS $ RENAME ${LONG_NAME_BASE}.dll DESTINATION sharedFramework COMPONENT runtime) + install(FILES $ RENAME ${LONG_NAME_BASE}.pdb DESTINATION sharedFramework/PDB COMPONENT runtime) if (NOT FEATURE_CROSSBITNESS) - install(PROGRAMS $ RENAME mscordaccore_${LONG_NAME_HOST_ARCH}_${LONG_NAME_TARGET_ARCH}_${FILE_VERSION}.dll DESTINATION sharedFramework COMPONENT crosscomponents) + install(PROGRAMS $ RENAME ${LONG_NAME_BASE}.dll DESTINATION sharedFramework COMPONENT crosscomponents) + install(FILES $ RENAME ${LONG_NAME_BASE}.pdb DESTINATION sharedFramework/PDB COMPONENT crosscomponents) endif() endif()