summaryrefslogtreecommitdiff
path: root/src/dlls
diff options
context:
space:
mode:
authorVance Morrison <vancemorrison@comcast.net>2018-03-16 17:26:21 -0700
committerVance Morrison <vancemorrison@comcast.net>2018-03-16 17:26:21 -0700
commitebdc98cf6c19e8a4f2de02e28f51048d25cbf70f (patch)
tree75e9cefd39564dcbaf3d5c924768fab28d424653 /src/dlls
parentf6213ca44958a2868d29f7ec806d24f5e84dde48 (diff)
downloadcoreclr-ebdc98cf6c19e8a4f2de02e28f51048d25cbf70f.tar.gz
coreclr-ebdc98cf6c19e8a4f2de02e28f51048d25cbf70f.tar.bz2
coreclr-ebdc98cf6c19e8a4f2de02e28f51048d25cbf70f.zip
This change make DacTableGen work for VS2017
There was a issue (see https://github.com/dotnet/coreclr/issues/11305) where a tool used in the CoreCLR build called DacTableGen requires a old version of the msdia120.dll. The symptom is that this tool would fail with a class not registered errror. This tool comes from a very old nuget package microsoft.dotnet.buildtools.coreclr, which we no longer can build easly. Our guidance now is to move tools that are only used in one repository (like this one) out of nuget packages and simply build them as part of the build. This change makes a step in that direction. The DacTableGen code actually was already in the CoreCLR repo, so this change 1. Fixes the source of DacTableGen so that tool no longer needs a com object to be registered (but it DOES need msdia140.dll to be on the path. This is true for VS2017. 2. Turns on the build of DacTableGen 3. Change the build use the built DacTableGen (unless running on VS2017, in that case we use the the version in the tool package. 4.) Remove the hack that warns people to register msdia120 (since you don't need to anymore) There is also an unrelated addition to the docs. This change should still work for VS2015 (because it falls back to the old DacTableGen in that case) Finally we should move to using the Linux method of creating the DAC, and so all these tools and their nuget package can be removed.
Diffstat (limited to 'src/dlls')
-rw-r--r--src/dlls/mscoree/coreclr/CMakeLists.txt9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/dlls/mscoree/coreclr/CMakeLists.txt b/src/dlls/mscoree/coreclr/CMakeLists.txt
index fb5cc90291..cb08438c4d 100644
--- a/src/dlls/mscoree/coreclr/CMakeLists.txt
+++ b/src/dlls/mscoree/coreclr/CMakeLists.txt
@@ -162,11 +162,18 @@ if(WIN32)
clr_unknown_arch()
endif()
+ set(DACTABLEGEN_EXE ${CMAKE_CURRENT_BINARY_DIR}/../../../ToolBox/SOS/DacTableGen/dactablegen.exe)
+ # The DactTableGen executable that we build needs an msdia140.dll supplied by Visual Studio.
+ # however VS2015 may not have this, so fall back to the DactTableGen in the tools package (which is old)
+ if($ENV{__VSVersion} STREQUAL "vs2015")
+ set(DACTABLEGEN_EXE ${BuildToolsDir}/dactablegen.exe)
+ endif()
+
add_custom_command(
DEPENDS coreclr mscordaccore mscordbi ${CLR_DIR}/src/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}/src/debug/daccess/daccess.cpp
- COMMAND ${BuildToolsDir}/dactablegen.exe /dac:${CMAKE_CURRENT_BINARY_DIR}/daccess.i /pdb:${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/coreclr.pdb /dll:$<TARGET_FILE:coreclr> /bin:${CMAKE_CURRENT_BINARY_DIR}/wks.bin
+ COMMAND ${DACTABLEGEN_EXE} /dac:${CMAKE_CURRENT_BINARY_DIR}/daccess.i /pdb:${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/coreclr.pdb /dll:$<TARGET_FILE:coreclr> /bin:${CMAKE_CURRENT_BINARY_DIR}/wks.bin
COMMAND ${BuildToolsDir}/InjectResource.exe /bin:${CMAKE_CURRENT_BINARY_DIR}/wks.bin /dll:$<TARGET_FILE:coreclr>
COMMAND ${BuildToolsDir}/GenClrDebugResource.exe /dac:$<TARGET_FILE:mscordaccore> /dbi:$<TARGET_FILE:mscordbi> /sku:onecoreclr /out:${CMAKE_CURRENT_BINARY_DIR}/clrDebugResource.bin
COMMAND ${BuildToolsDir}/InjectResource.exe /bin:${CMAKE_CURRENT_BINARY_DIR}/clrDebugResource.bin /dll:$<TARGET_FILE:coreclr> /name:CLRDEBUGINFO