From 146c865f7472b569e7fa3354ab9f0cd08c9496dc Mon Sep 17 00:00:00 2001 From: Vladimir Sadov Date: Tue, 2 Mar 2021 21:16:30 -0800 Subject: Embedding dac and other debugging resources into singlefilehost (#49033) * Embedding dac and other debugging resources into singlefilehost * Embed DAC later, when it had a chance to be signed. * MINIDUMP_EMBEDDED_AUXILIARY_PROVIDER Co-authored-by: Juan Hoyos * fix for cross builds Co-authored-by: Juan Hoyos --- src/coreclr/dlls/mscoree/coreclr/CMakeLists.txt | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src/coreclr/dlls') diff --git a/src/coreclr/dlls/mscoree/coreclr/CMakeLists.txt b/src/coreclr/dlls/mscoree/coreclr/CMakeLists.txt index 705caaedb51..b22ccf1a6bc 100644 --- a/src/coreclr/dlls/mscoree/coreclr/CMakeLists.txt +++ b/src/coreclr/dlls/mscoree/coreclr/CMakeLists.txt @@ -204,16 +204,28 @@ if(CLR_CMAKE_TARGET_WIN32) endif() add_custom_command( - DEPENDS coreclr mscordaccore mscordbi ${CLR_DIR}/debug/daccess/daccess.cpp + DEPENDS coreclr singlefilehost mscordaccore mscordbi ${CLR_DIR}/debug/daccess/daccess.cpp OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/inject_debug_resources.timestamp COMMAND ${CMAKE_CXX_COMPILER} /P /EP /TP ${PREPROCESS_DEFINITIONS} ${INC_DIR} /Fi${CMAKE_CURRENT_BINARY_DIR}/daccess.i ${CLR_DIR}/debug/daccess/daccess.cpp + + # make and inject dactable for coreclr COMMAND cmd /c ${CLR_REPO_ROOT_DIR}/dotnet.cmd exec ${CMAKE_INSTALL_PREFIX}/DacTableGen/DacTableGen.dll /dac:${CMAKE_CURRENT_BINARY_DIR}/daccess.i /pdb:$ /dll:$ /bin:${CMAKE_CURRENT_BINARY_DIR}/wks.bin COMMAND InjectResource /bin:${CMAKE_CURRENT_BINARY_DIR}/wks.bin /dll:$ + + # make and inject dactable for singlefilehost + COMMAND cmd /c ${CLR_REPO_ROOT_DIR}/dotnet.cmd exec ${CMAKE_INSTALL_PREFIX}/DacTableGen/DacTableGen.dll /dac:${CMAKE_CURRENT_BINARY_DIR}/daccess.i /pdb:$ /dll:$ /bin:${CMAKE_CURRENT_BINARY_DIR}/sfh.bin + COMMAND InjectResource /bin:${CMAKE_CURRENT_BINARY_DIR}/sfh.bin /dll:$ + + # make CLRDEBUGINFO resource and inject into coreclr and singlefilehost COMMAND GenClrDebugResource /dac:$ /dbi:$ /sku:onecoreclr /out:${CMAKE_CURRENT_BINARY_DIR}/clrDebugResource.bin COMMAND InjectResource /bin:${CMAKE_CURRENT_BINARY_DIR}/clrDebugResource.bin /dll:$ /name:CLRDEBUGINFO + COMMAND InjectResource /bin:${CMAKE_CURRENT_BINARY_DIR}/clrDebugResource.bin /dll:$ /name:CLRDEBUGINFO + + # inject MINIDUMP_AUXILIARY_PROVIDER into coreclr COMMAND InjectResource /bin:${CMAKE_CURRENT_SOURCE_DIR}/dump_helper_resource.bin /dll:$ /name:MINIDUMP_AUXILIARY_PROVIDER + COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/inject_debug_resources.timestamp - COMMENT Add dactable, debug resources, and dump helper resources to coreclr + COMMENT Add dactable, debug resources, and dump helper resources to coreclr and singlefilehost ) if(NOT DEFINED CLR_CROSS_COMPONENTS_BUILD) -- cgit v1.2.3