Skip to content

Commit e37fb3a

Browse files
authored
Implement .Net Core build and x64 Linux support (#123)
This change adds .Net Core build support (next NuGet release will include .Net Standard 2.0 library). This change also adds support for Linux core dump debugging. Attaching to live processes on Linux not implemented in this build. I'm pushing this down to the main branch to stabilize, merge other PRs, and get it ready to ship. Please do not consider this build final and the surface area stable until this is shipped as a NuGet package. There are likely some issues right now, but I'm working to resolve them asap. Some high level details: Moved the build to Arcade to support building on linux. Disabled tests, as they do not function under Arcade. .Net Core does not support CodeDOM, which the current test system uses as well. I'll have to rethink/reimplement the test infrastructure in a future change. The tests do pass when I forced them to run in an outside environment. Removed COM wrappings of dac interfaces and reimplement them by hand. (.Net Core on linux doesn't have COM enabled, and CLR still uses it on Linux...) Added an Elf core dump reader. This is not intended to ever be public. Shuffled around some of the guts of ClrMD, but no functionality should be changed or affected.
1 parent c81a592 commit e37fb3a

File tree

184 files changed

+6053
-2073
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

184 files changed

+6053
-2073
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
syntax: glob
22

3+
.dotnet
4+
.packages
5+
36
### VisualStudio ###
47

58
# User-specific files

Build.cmd

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
set scriptRoot=%~dp0
3+
set binDir=%scriptRoot%bin
4+
5+
if not exist %binDir% mkdir %binDir%
6+
call %scriptRoot%init-tools.cmd
7+
call %scriptRoot%Tools\dotnetcli\dotnet restore %scriptRoot%src\Microsoft.Diagnostics.Runtime.sln --packages %scriptRoot%packages
8+
call %scriptRoot%Tools\dotnetcli\dotnet msbuild %scriptRoot%src\Microsoft.Diagnostics.Runtime.sln /p:OutDir="%scriptRoot%\bin" /m /v:m /flp:verbosity=normal;LogFile=%binDir%\msbuild.log %*

License.txt

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Copyright (c) .NET Foundation and Contributors
2+
3+
All rights reserved.
4+
5+
Licensed under the Apache License, Version 2.0 (the “License”); you may not
6+
use this file except in compliance with the License. You may obtain a copy of
7+
the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13+
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14+
License for the specific language governing permissions and limitations under
15+
the License.

Microsoft.Diagnostics.Runtime.sln

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.26228.9
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Diagnostics.Runtime", "src\Microsoft.Diagnostics.Runtime\Microsoft.Diagnostics.Runtime.csproj", "{A82126CA-23AA-41F1-8586-A5938D44D0A7}"
7+
EndProject
8+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LinuxTest", "src\Samples\LinuxTest\LinuxTest.csproj", "{480E59E9-95EC-4251-B03D-C8D2159FD510}"
9+
EndProject
10+
Global
11+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
12+
Debug|Any CPU = Debug|Any CPU
13+
Debug|Mixed Platforms = Debug|Mixed Platforms
14+
Debug|Win32 = Debug|Win32
15+
Debug|x64 = Debug|x64
16+
Debug|x86 = Debug|x86
17+
Release|Any CPU = Release|Any CPU
18+
Release|Mixed Platforms = Release|Mixed Platforms
19+
Release|Win32 = Release|Win32
20+
Release|x64 = Release|x64
21+
Release|x86 = Release|x86
22+
EndGlobalSection
23+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
24+
{A82126CA-23AA-41F1-8586-A5938D44D0A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
25+
{A82126CA-23AA-41F1-8586-A5938D44D0A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
26+
{A82126CA-23AA-41F1-8586-A5938D44D0A7}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
27+
{A82126CA-23AA-41F1-8586-A5938D44D0A7}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
28+
{A82126CA-23AA-41F1-8586-A5938D44D0A7}.Debug|Win32.ActiveCfg = Debug|Any CPU
29+
{A82126CA-23AA-41F1-8586-A5938D44D0A7}.Debug|x64.ActiveCfg = Debug|Any CPU
30+
{A82126CA-23AA-41F1-8586-A5938D44D0A7}.Debug|x64.Build.0 = Debug|Any CPU
31+
{A82126CA-23AA-41F1-8586-A5938D44D0A7}.Debug|x86.ActiveCfg = Debug|Any CPU
32+
{A82126CA-23AA-41F1-8586-A5938D44D0A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
33+
{A82126CA-23AA-41F1-8586-A5938D44D0A7}.Release|Any CPU.Build.0 = Release|Any CPU
34+
{A82126CA-23AA-41F1-8586-A5938D44D0A7}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
35+
{A82126CA-23AA-41F1-8586-A5938D44D0A7}.Release|Mixed Platforms.Build.0 = Release|Any CPU
36+
{A82126CA-23AA-41F1-8586-A5938D44D0A7}.Release|Win32.ActiveCfg = Release|Any CPU
37+
{A82126CA-23AA-41F1-8586-A5938D44D0A7}.Release|x64.ActiveCfg = Release|Any CPU
38+
{A82126CA-23AA-41F1-8586-A5938D44D0A7}.Release|x64.Build.0 = Release|Any CPU
39+
{A82126CA-23AA-41F1-8586-A5938D44D0A7}.Release|x86.ActiveCfg = Release|Any CPU
40+
{480E59E9-95EC-4251-B03D-C8D2159FD510}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
41+
{480E59E9-95EC-4251-B03D-C8D2159FD510}.Debug|Any CPU.Build.0 = Debug|Any CPU
42+
{480E59E9-95EC-4251-B03D-C8D2159FD510}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
43+
{480E59E9-95EC-4251-B03D-C8D2159FD510}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
44+
{480E59E9-95EC-4251-B03D-C8D2159FD510}.Debug|Win32.ActiveCfg = Debug|Any CPU
45+
{480E59E9-95EC-4251-B03D-C8D2159FD510}.Debug|Win32.Build.0 = Debug|Any CPU
46+
{480E59E9-95EC-4251-B03D-C8D2159FD510}.Debug|x64.ActiveCfg = Debug|Any CPU
47+
{480E59E9-95EC-4251-B03D-C8D2159FD510}.Debug|x64.Build.0 = Debug|Any CPU
48+
{480E59E9-95EC-4251-B03D-C8D2159FD510}.Debug|x86.ActiveCfg = Debug|Any CPU
49+
{480E59E9-95EC-4251-B03D-C8D2159FD510}.Debug|x86.Build.0 = Debug|Any CPU
50+
{480E59E9-95EC-4251-B03D-C8D2159FD510}.Release|Any CPU.ActiveCfg = Release|Any CPU
51+
{480E59E9-95EC-4251-B03D-C8D2159FD510}.Release|Any CPU.Build.0 = Release|Any CPU
52+
{480E59E9-95EC-4251-B03D-C8D2159FD510}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
53+
{480E59E9-95EC-4251-B03D-C8D2159FD510}.Release|Mixed Platforms.Build.0 = Release|Any CPU
54+
{480E59E9-95EC-4251-B03D-C8D2159FD510}.Release|Win32.ActiveCfg = Release|Any CPU
55+
{480E59E9-95EC-4251-B03D-C8D2159FD510}.Release|Win32.Build.0 = Release|Any CPU
56+
{480E59E9-95EC-4251-B03D-C8D2159FD510}.Release|x64.ActiveCfg = Release|Any CPU
57+
{480E59E9-95EC-4251-B03D-C8D2159FD510}.Release|x64.Build.0 = Release|Any CPU
58+
{480E59E9-95EC-4251-B03D-C8D2159FD510}.Release|x86.ActiveCfg = Release|Any CPU
59+
{480E59E9-95EC-4251-B03D-C8D2159FD510}.Release|x86.Build.0 = Release|Any CPU
60+
EndGlobalSection
61+
GlobalSection(SolutionProperties) = preSolution
62+
HideSolutionNode = FALSE
63+
EndGlobalSection
64+
GlobalSection(ExtensibilityGlobals) = postSolution
65+
SolutionGuid = {7DB8722F-5AAF-4913-A5AF-4A77D75BC39C}
66+
EndGlobalSection
67+
EndGlobal

Restore.cmd

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@echo off
2+
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\common\Build.ps1""" -restore %*"
3+
exit /b %ErrorLevel%

Test.cmd

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@echo off
2+
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\common\Build.ps1""" -test %*"
3+
exit /b %ErrorLevel%
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/home/leculver/git/clrmd/.packages/microsoft.dotnet.arcade.sdk/1.0.0-beta.18478.1/tools/Build.proj
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"version": 1,
3+
"dgSpecHash": "4Ppsy+4q+Q1CF1ROLlhcL4K7YT/hKmXa01oHqoYYWn+Kc9lLtltob1IhSkAscFiVuqFQn4tkNevH2Z5gU3IVzw==",
4+
"success": true
5+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="utf-8" standalone="no"?>
2+
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
4+
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
5+
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
6+
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">/home/leculver/git/clrmd/artifacts/toolset/Common/project.assets.json</ProjectAssetsFile>
7+
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">/home/leculver/git/clrmd/.packages</NuGetPackageRoot>
8+
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">/home/leculver/git/clrmd/.packages;/home/leculver/git/clrmd/.dotnet/sdk/NuGetFallbackFolder</NuGetPackageFolders>
9+
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
10+
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">4.8.0</NuGetToolVersion>
11+
</PropertyGroup>
12+
<PropertyGroup>
13+
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
14+
</PropertyGroup>
15+
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
16+
<Import Project="$(NuGetPackageRoot)/vswhere/2.5.2/build/vswhere.props" Condition="Exists('$(NuGetPackageRoot)/vswhere/2.5.2/build/vswhere.props')" />
17+
<Import Project="$(NuGetPackageRoot)/microsoft.dotnet.signtool/1.0.0-beta.18471.7/build/Microsoft.DotNet.SignTool.props" Condition="Exists('$(NuGetPackageRoot)/microsoft.dotnet.signtool/1.0.0-beta.18471.7/build/Microsoft.DotNet.SignTool.props')" />
18+
<Import Project="$(NuGetPackageRoot)/microbuild.core/0.2.0/build/MicroBuild.Core.props" Condition="Exists('$(NuGetPackageRoot)/microbuild.core/0.2.0/build/MicroBuild.Core.props')" />
19+
</ImportGroup>
20+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="utf-8" standalone="no"?>
2+
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
5+
</PropertyGroup>
6+
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
7+
<Import Project="$(NuGetPackageRoot)/microbuild.core/0.2.0/build/MicroBuild.Core.targets" Condition="Exists('$(NuGetPackageRoot)/microbuild.core/0.2.0/build/MicroBuild.Core.targets')" />
8+
</ImportGroup>
9+
</Project>

0 commit comments

Comments
 (0)