summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/workflow/OfficalAndDailyBuilds.md6
-rw-r--r--build.cmd17
-rw-r--r--src/ToolBox/SOS/CMakeLists.txt1
-rw-r--r--src/ToolBox/SOS/DacTableGen/CMakeLists.txt8
-rw-r--r--src/ToolBox/SOS/DacTableGen/DIALib.dllbin0 -> 42496 bytes
-rw-r--r--src/ToolBox/SOS/DacTableGen/diautil.cs36
-rw-r--r--src/dlls/mscoree/coreclr/CMakeLists.txt9
7 files changed, 53 insertions, 24 deletions
diff --git a/Documentation/workflow/OfficalAndDailyBuilds.md b/Documentation/workflow/OfficalAndDailyBuilds.md
index 7aa1fa0699..9ae49d7631 100644
--- a/Documentation/workflow/OfficalAndDailyBuilds.md
+++ b/Documentation/workflow/OfficalAndDailyBuilds.md
@@ -16,6 +16,12 @@ repositories. You can see what is available from
* CoreCLR at <https://dotnet.myget.org/feed/dotnet-core/package/nuget/Microsoft.NETCore.Runtime.CoreCLR>
* NETCore.App at <https://dotnet.myget.org/feed/dotnet-core/package/nuget/Microsoft.NETCore.App>
+These builds have a version number that follows the the versioning scheme described below (month number/day of month),
+but they also will have a component that indicate which Git Branch the are working from
+
+ * preview1 - are daily builds from the 'release/*' branch where * is the next official version to be released
+ * preview2 - are daily builds from the 'master' branch (where active work happens first (typically))
+
Thus if your goal is just to get the latest bug fixes and features, you don't need to build CoreCLR yourself you
can simply add <https://dotnet.myget.org/F/dotnet-core/api/v3/index.json> to your Nuget Feed list and set the
`RuntimeFrameworkVersion` in your project file to a `Microsoft.NETCore.App` version. You need to restore
diff --git a/build.cmd b/build.cmd
index 889a1962d4..888e8e48d6 100644
--- a/build.cmd
+++ b/build.cmd
@@ -12,23 +12,6 @@ set __ThisScriptDir="%~dp0"
call "%__ThisScriptDir%"\setup_vs_tools.cmd
if NOT '%ERRORLEVEL%' == '0' exit /b 1
-REM Make the work-around to a bug in the microsoft.dotnet.buildtools.coreclr package until it is fixed.
-reg query HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{3BFCEA48-620F-4B6B-81F7-B9AF75454C7D}\InprocServer32 > NUL: 2>&1
-if NOT '%ERRORLEVEL%' == '0' (
- echo.
- echo.**********************************************************************************
- echo.Error: We have detected that the msdia120.dll is not registered.
- echo.This is necessary for the build to complete without a Class_Not_Registered error.
- echo.
- echo.You can fix this by
- echo. 1. Launching the "Developer Command Prompt for VS2017" with Administrative privileges
- echo. 2. Running regsvr32.exe "%%VSINSTALLDIR%%\Common7\IDE\msdia120.dll"
- echo.
- echo.This will only need to be done once for the lifetime of the machine.
- echo.For more details see: https://github.com/dotnet/coreclr/issues/11305
- exit /b 1
-)
-
if defined VS150COMNTOOLS (
set "__VSToolsRoot=%VS150COMNTOOLS%"
set "__VCToolsRoot=%VS150COMNTOOLS%\..\..\VC\Auxiliary\Build"
diff --git a/src/ToolBox/SOS/CMakeLists.txt b/src/ToolBox/SOS/CMakeLists.txt
index 9380dc1de6..212f4eebd7 100644
--- a/src/ToolBox/SOS/CMakeLists.txt
+++ b/src/ToolBox/SOS/CMakeLists.txt
@@ -1,3 +1,4 @@
if(WIN32)
+ add_subdirectory(DacTableGen)
add_subdirectory(Strike)
endif(WIN32)
diff --git a/src/ToolBox/SOS/DacTableGen/CMakeLists.txt b/src/ToolBox/SOS/DacTableGen/CMakeLists.txt
index 01ee51f7a4..c980cc2ff8 100644
--- a/src/ToolBox/SOS/DacTableGen/CMakeLists.txt
+++ b/src/ToolBox/SOS/DacTableGen/CMakeLists.txt
@@ -7,13 +7,13 @@ set(DACTABLEGEN_SOURCES
# Cmake does not support csharp sources so add custom command
add_custom_target(dactablegen ALL
- COMMAND csc.exe /t:exe /platform:anycpu /r:System.dll /r:$<TARGET_FILE:dialib_dll> /out:${CMAKE_CURRENT_BINARY_DIR}/dactablegen.exe ${DACTABLEGEN_SOURCES}
- COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:dialib_dll> $<TARGET_FILE_DIR:dactablegen_exe>
- DEPENDS ${DACTABLEGEN_SOURCES} dialib
+ COMMAND csc.exe /t:exe /platform:anycpu32bitpreferred /r:System.dll /r:DiaLib.dll /out:${CMAKE_CURRENT_BINARY_DIR}/dactablegen.exe ${DACTABLEGEN_SOURCES}
+ COMMAND ${CMAKE_COMMAND} -E copy DIAlib.dll ${CMAKE_CURRENT_BINARY_DIR}
+ DEPENDS ${DACTABLEGEN_SOURCES} DIAlib.dll
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
# In order to use dactablegen as an executable target it needs to be imported.
# Target is used in dll/mscoree/coreclr/cmakelists.txt
add_executable(dactablegen_exe IMPORTED GLOBAL)
-set_property(TARGET dactablegen_exe PROPERTY IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/dactablegen.exe) \ No newline at end of file
+set_property(TARGET dactablegen_exe PROPERTY IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/dactablegen.exe)
diff --git a/src/ToolBox/SOS/DacTableGen/DIALib.dll b/src/ToolBox/SOS/DacTableGen/DIALib.dll
new file mode 100644
index 0000000000..06665740dc
--- /dev/null
+++ b/src/ToolBox/SOS/DacTableGen/DIALib.dll
Binary files differ
diff --git a/src/ToolBox/SOS/DacTableGen/diautil.cs b/src/ToolBox/SOS/DacTableGen/diautil.cs
index d0e9c811a7..f0937b190e 100644
--- a/src/ToolBox/SOS/DacTableGen/diautil.cs
+++ b/src/ToolBox/SOS/DacTableGen/diautil.cs
@@ -97,7 +97,7 @@ class Util
public class DiaFile
{
- DiaSourceClass m_dsc;
+ IDiaDataSource m_dsc;
IDiaSession m_session;
DiaSymbol m_global;
IDiaEnumSymbols m_publicsEnum;
@@ -106,7 +106,7 @@ public class DiaFile
public DiaFile(String pdbFile, String dllFile)
{
- m_dsc = new DiaSourceClass();
+ m_dsc = GetDiaSourceClass();
string pdbPath = System.IO.Path.GetDirectoryName(pdbFile);
// Open the PDB file, validating it matches the supplied DLL file
@@ -414,6 +414,37 @@ public class DiaFile
E_PDB_SYMSRV_CACHE_FULL ,
E_PDB_MAX
}
+
+ // Get the DiaSourceClass from the msdia140.dll in the app directory without using COM activation
+ static IDiaDataSource GetDiaSourceClass() {
+ // This is Class ID for the DiaSourceClass used by msdia140.
+ var diaSourceClassGuid = new Guid("{e6756135-1e65-4d17-8576-610761398c3c}");
+ var comClassFactory = (IClassFactory)DllGetClassObject(diaSourceClassGuid, typeof(IClassFactory).GUID);
+
+ // As the DLL to create a new instance of it
+ object comObject = null;
+ Guid iDiaDataSourceGuid = typeof(IDiaDataSource).GUID;
+ comClassFactory.CreateInstance(null, ref iDiaDataSourceGuid, out comObject);
+
+ // And return it as the type we expect
+ return (comObject as IDiaDataSource);
+ }
+
+ [return: MarshalAs(UnmanagedType.Interface)]
+ [DllImport("msdia140.dll", CharSet = CharSet.Unicode, ExactSpelling = true, PreserveSig = false)]
+ private static extern object DllGetClassObject(
+ [In, MarshalAs(UnmanagedType.LPStruct)] Guid rclsid,
+ [In, MarshalAs(UnmanagedType.LPStruct)] Guid riid);
+
+ [ComImport, ComVisible(false), Guid("00000001-0000-0000-C000-000000000046"),
+ InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
+ private interface IClassFactory
+ {
+ void CreateInstance([MarshalAs(UnmanagedType.Interface)] object aggregator,
+ ref Guid refiid,
+ [MarshalAs(UnmanagedType.Interface)] out object createdObject);
+ void LockServer(bool incrementRefCount);
+ }
}
/***************************************************************************************
@@ -806,4 +837,5 @@ public class DiaDataSymbol : DiaSymbol
}
}
+
} // Namespace Dia.Util
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