Merge pull request #6844 from brianrob/disable_partial_crossgen

Disable Partial Crossgen and Crossgen More Binaries
This commit is contained in:
Daniel Plaisted 2020-03-23 13:55:33 -07:00 committed by GitHub
commit 8b76f8dc98
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 1 deletions

View file

@ -13,6 +13,13 @@ namespace Microsoft.DotNet.Build.Tasks
{
public sealed class Crossgen : ToolTask
{
public Crossgen()
{
// Disable partial NGEN to avoid excess JIT-compilation.
// The intention is to pre-compile as much as possible.
EnvironmentVariables = new string[] { "COMPlus_PartialNGen=0" };
}
[Required]
public string SourceAssembly { get;set; }
@ -136,7 +143,7 @@ namespace Microsoft.DotNet.Build.Tasks
return $"{GetReadyToRun()} {GetPlatformAssemblyPaths()} {GetDiasymReaderPath()} {GetCreateSymbols()}";
}
return $"{GetReadyToRun()} {GetInPath()} {GetOutPath()} {GetPlatformAssemblyPaths()} {GetJitPath()}";
return $"{GetReadyToRun()} {GetMissingDependenciesOk()} {GetInPath()} {GetOutPath()} {GetPlatformAssemblyPaths()} {GetJitPath()}";
}
private string GetCreateSymbols()
@ -195,6 +202,11 @@ namespace Microsoft.DotNet.Build.Tasks
return $"-JITPath {JITPath}";
}
private string GetMissingDependenciesOk()
{
return "-MissingDependenciesOK";
}
protected override void LogToolCommand(string message)
{
base.LogToolCommand($"{base.GetWorkingDirectory()}> {message}");

View file

@ -48,6 +48,11 @@
<!-- Add back the .NET Core assemblies in the Sdks folder -->
<RemainingFiles Include="$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk\tools\netcoreapp*\**\*" />
<RemainingFiles Include="$(SdkOutputDirectory)Sdks\NuGet.Build.Tasks.Pack\CoreCLR\**\*" />
<RemainingFiles Include="$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Razor\**\*" />
<RemainingFiles Include="$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Web\**\*" />
<RemainingFiles Include="$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.WindowsDesktop\tools\netcoreapp*\**\*" />
<RemainingFiles Include="$(SdkOutputDirectory)Sdks\ILLink.Tasks\tools\netcoreapp*\**\*" />
<RemainingFiles Include="$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Publish\tools\netcoreapp*\**\*" />
<!-- Don't try to CrossGen .NET Framework support assemblies for .NET Standard -->
<RemainingFiles Remove="$(SdkOutputDirectory)Microsoft\Microsoft.NET.Build.Extensions\net*\**\*" />