Crossgen Shared Framework managed assemblies
- Use Crossgen's Ready To Run mode on all of the managed assemblies that make up the shared framework. - Upgrade the version of the shared framework to match what is used in the rest of CLI (see the comment in SharedFrameworkTargets.cs to understand why this is needed). - Remove the IL mscorlib.dll image, since the Crossgen'd image is already published. Fixes dotnet/corefx#6753
This commit is contained in:
parent
56e5a99c54
commit
4df5ed39d5
6 changed files with 110 additions and 35 deletions
50
scripts/dotnet-cli-build/Utils/Crossgen.cs
Normal file
50
scripts/dotnet-cli-build/Utils/Crossgen.cs
Normal file
|
@ -0,0 +1,50 @@
|
|||
using System.IO;
|
||||
using System.Linq;
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Microsoft.DotNet.Cli.Build.Framework;
|
||||
using Microsoft.Extensions.PlatformAbstractions;
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Build
|
||||
{
|
||||
internal static class Crossgen
|
||||
{
|
||||
public static string GetCrossgenPathForVersion(string coreClrVersion)
|
||||
{
|
||||
string arch = PlatformServices.Default.Runtime.RuntimeArchitecture;
|
||||
string packageId;
|
||||
if (CurrentPlatform.IsWindows)
|
||||
{
|
||||
packageId = $"runtime.win7-{arch}.Microsoft.NETCore.Runtime.CoreCLR";
|
||||
}
|
||||
else if (CurrentPlatform.IsUbuntu)
|
||||
{
|
||||
packageId = "runtime.ubuntu.14.04-x64.Microsoft.NETCore.Runtime.CoreCLR";
|
||||
}
|
||||
else if (CurrentPlatform.IsCentOS || CurrentPlatform.IsRHEL)
|
||||
{
|
||||
// CentOS runtime is in the runtime.rhel.7-x64... package.
|
||||
packageId = "runtime.rhel.7-x64.Microsoft.NETCore.Runtime.CoreCLR";
|
||||
}
|
||||
else if (CurrentPlatform.IsOSX)
|
||||
{
|
||||
packageId = "runtime.osx.10.10-x64.Microsoft.NETCore.Runtime.CoreCLR";
|
||||
}
|
||||
else if (CurrentPlatform.IsDebian)
|
||||
{
|
||||
packageId = "runtime.debian.8.2-x64.Microsoft.NETCore.Runtime.CoreCLR";
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return Path.Combine(
|
||||
Dirs.NuGetPackages,
|
||||
packageId,
|
||||
coreClrVersion,
|
||||
"tools",
|
||||
$"crossgen{Constants.ExeSuffix}");
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue