Caricamento del resto di questo confronto.

diff-runtime_sdk-Microsoft.NET.CrossGen.targets

Creato Il diff non scade mai
2 rimozioni
452 linee
7 aggiunte
457 linee
<!--
<!--
***********************************************************************************************
***********************************************************************************************
Microsoft.NET.CrossGen.targets
Microsoft.NET.CrossGen.targets


WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
impossible to load or build your projects from the command-line or the IDE.


Copyright (c) .NET Foundation. All rights reserved.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
***********************************************************************************************
-->
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">


<!--
<!--
For ReadyToRun compilation, default to Crossgen for .NET Core 3.x and .NET 5. If PublishReadyToRunUseCrossgen2
For ReadyToRun compilation, default to Crossgen for .NET Core 3.x and .NET 5. If PublishReadyToRunUseCrossgen2
is set to true in the project or on the command line, use Crossgen2 and default to composite mode. For .NET 6
is set to true in the project or on the command line, use Crossgen2 and default to composite mode. For .NET 6
and higher, always use Crossgen2 and default to non-composite mode.
and higher, always use Crossgen2 and default to non-composite mode.
-->
-->
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(_TargetFrameworkVersionWithoutV)' >= '3.0'">
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(_TargetFrameworkVersionWithoutV)' >= '3.0'">
<PublishReadyToRunUseCrossgen2 Condition="'$(_TargetFrameworkVersionWithoutV)' >= '6.0'">true</PublishReadyToRunUseCrossgen2>
<PublishReadyToRunUseCrossgen2 Condition="'$(_TargetFrameworkVersionWithoutV)' >= '6.0'">true</PublishReadyToRunUseCrossgen2>
<PublishReadyToRunComposite Condition="'$(PublishReadyToRunComposite)' == '' and '$(PublishSingleFile)' == 'true' and '$(PublishReadyToRun)' == 'true' and '$(_TargetFrameworkVersionWithoutV)' >= '7.0'">true</PublishReadyToRunComposite>
<PublishReadyToRunComposite Condition="'$(PublishReadyToRunComposite)' == '' and '$(PublishSingleFile)' == 'true' and '$(PublishReadyToRun)' == 'true' and '$(_TargetFrameworkVersionWithoutV)' >= '7.0'">true</PublishReadyToRunComposite>
<PublishReadyToRunComposite Condition="'$(PublishReadyToRunComposite)' == '' and '$(_TargetFrameworkVersionWithoutV)' >= '6.0'">false</PublishReadyToRunComposite>
<PublishReadyToRunComposite Condition="'$(PublishReadyToRunComposite)' == '' and '$(_TargetFrameworkVersionWithoutV)' >= '6.0'">false</PublishReadyToRunComposite>
<PublishReadyToRunComposite Condition="'$(PublishReadyToRunComposite)' == ''">true</PublishReadyToRunComposite>
<PublishReadyToRunComposite Condition="'$(PublishReadyToRunComposite)' == ''">true</PublishReadyToRunComposite>
<PublishReadyToRunComposite Condition="'$(PublishReadyToRunUseCrossgen2)' != 'true' or '$(SelfContained)' != 'true'">false</PublishReadyToRunComposite>
<PublishReadyToRunComposite Condition="'$(PublishReadyToRunUseCrossgen2)' != 'true' or '$(SelfContained)' != 'true'">false</PublishReadyToRunComposite>
<PublishReadyToRunUseRuntimePackOptimizationData Condition="'$(PublishReadyToRunUseRuntimePackOptimizationData)' == ''">true</PublishReadyToRunUseRuntimePackOptimizationData>
<PublishReadyToRunUseRuntimePackOptimizationData Condition="'$(PublishReadyToRunUseRuntimePackOptimizationData)' == ''">true</PublishReadyToRunUseRuntimePackOptimizationData>
<PublishReadyToRunPerfmapFormatVersion Condition="'$(PublishReadyToRunPerfmapFormatVersion)' == ''">1</PublishReadyToRunPerfmapFormatVersion>
<PublishReadyToRunPerfmapFormatVersion Condition="'$(PublishReadyToRunPerfmapFormatVersion)' == ''">1</PublishReadyToRunPerfmapFormatVersion>
<PublishReadyToRunEmitSymbols Condition="'$(TargetPlatformIdentifier)' == 'ios' or '$(TargetPlatformIdentifier)' == 'tvos' or '$(TargetPlatformIdentifier)' == 'maccatalyst'">false</PublishReadyToRunEmitSymbols>
</PropertyGroup>
</PropertyGroup>


<!--
<!--
============================================================
============================================================
PrepOptimizer
PrepOptimizer


Sets up the common infrastructure for the optimization phase
Sets up the common infrastructure for the optimization phase
Outputs:
Outputs:
JitPath
JitPath
Crossgen
Crossgen
============================================================
============================================================
-->
-->


<Target Name="PrepOptimizer"
<Target Name="PrepOptimizer"
DependsOnTargets="_RestoreCrossgen;"
DependsOnTargets="_RestoreCrossgen;"
Condition="$(SkipOptimization) != 'true' ">
Condition="$(SkipOptimization) != 'true' ">
<!-- Get the coreclr path -->
<!-- Get the coreclr path -->
<ItemGroup>
<ItemGroup>
<_CoreclrResolvedPath Include="@(CrossgenResolvedAssembliesToPublish)"
<_CoreclrResolvedPath Include="@(CrossgenResolvedAssembliesToPublish)"
Condition="'%(CrossgenResolvedAssembliesToPublish.Filename)'=='coreclr'" />
Condition="'%(CrossgenResolvedAssembliesToPublish.Filename)'=='coreclr'" />
<_CoreclrResolvedPath Include="@(CrossgenResolvedAssembliesToPublish)"
<_CoreclrResolvedPath Include="@(CrossgenResolvedAssembliesToPublish)"
Condition="'%(CrossgenResolvedAssembliesToPublish.Filename)'=='libcoreclr'" />
Condition="'%(CrossgenResolvedAssembliesToPublish.Filename)'=='libcoreclr'" />
<_JitResolvedPath Include="@(CrossgenResolvedAssembliesToPublish)"
<_JitResolvedPath Include="@(CrossgenResolvedAssembliesToPublish)"
Condition="'%(CrossgenResolvedAssembliesToPublish.Filename)'=='clrjit'" />
Condition="'%(CrossgenResolvedAssembliesToPublish.Filename)'=='clrjit'" />
<_JitResolvedPath Include="@(CrossgenResolvedAssembliesToPublish)"
<_JitResolvedPath Include="@(CrossgenResolvedAssembliesToPublish)"
Condition="'%(CrossgenResolvedAssembliesToPublish.Filename)'=='libclrjit'" />
Condition="'%(CrossgenResolvedAssembliesToPublish.Filename)'=='libclrjit'" />
</ItemGroup>
</ItemGroup>


<NETSdkError Condition="'@(_CoreclrResolvedPath->Count())' &gt; 1"
<NETSdkError Condition="'@(_CoreclrResolvedPath->Count())' &gt; 1"
ResourceName="MultipleFilesResolved"
ResourceName="MultipleFilesResolved"
FormatArguments="coreclr" />
FormatArguments="coreclr" />


<NETSdkError Condition="'@(_CoreclrResolvedPath)'== ''"
<NETSdkError Condition="'@(_CoreclrResolvedPath)'== ''"
ResourceName="UnableToFindResolvedPath"
ResourceName="UnableToFindResolvedPath"
FormatArguments="coreclr" />
FormatArguments="coreclr" />


<NETSdkError Condition="'@(_JitResolvedPath->Count())' &gt; 1"
<NETSdkError Condition="'@(_JitResolvedPath->Count())' &gt; 1"
ResourceName="MultipleFilesResolved"
ResourceName="MultipleFilesResolved"
FormatArguments="jit" />
FormatArguments="jit" />


<NETSdkError Condition="'@(_JitResolvedPath)'== ''"
<NETSdkError Condition="'@(_JitResolvedPath)'== ''"
ResourceName="UnableToFindResolvedPath"
ResourceName="UnableToFindResolvedPath"
FormatArguments="jit" />
FormatArguments="jit" />


<!-- Get the crossgen and jit path-->
<!-- Get the crossgen and jit path-->
<PropertyGroup>
<PropertyGroup>
<_CoreclrPath>@(_CoreclrResolvedPath)</_CoreclrPath>
<_CoreclrPath>@(_CoreclrResolvedPath)</_CoreclrPath>
<JitPath>@(_JitResolvedPath)</JitPath>
<JitPath>@(_JitResolvedPath)</JitPath>
<_CoreclrDir>$([System.IO.Path]::GetDirectoryName($(_CoreclrPath)))</_CoreclrDir>
<_CoreclrDir>$([System.IO.Path]::GetDirectoryName($(_CoreclrPath)))</_CoreclrDir>
<_CoreclrPkgDir>$([System.IO.Path]::Combine($(_CoreclrDir),"..\..\..\"))</_CoreclrPkgDir>
<_CoreclrPkgDir>$([System.IO.Path]::Combine($(_CoreclrDir),"..\..\..\"))</_CoreclrPkgDir>
<CrossgenDir>$([System.IO.Path]::Combine($(_CoreclrPkgDir),"tools"))</CrossgenDir>
<CrossgenDir>$([System.IO.Path]::Combine($(_CoreclrPkgDir),"tools"))</CrossgenDir>
<!-- TODO override with rid specific tools path for x-arch -->
<!-- TODO override with rid specific tools path for x-arch -->
<Crossgen>$([System.IO.Path]::Combine($(CrossgenDir),"crossgen"))</Crossgen>
<Crossgen>$([System.IO.Path]::Combine($(CrossgenDir),"crossgen"))</Crossgen>
<Crossgen Condition="$([MSBuild]::IsOSPlatform(`Windows`))">$([System.IO.Path]::Combine($(CrossgenDir),"crossgen.exe"))</Crossgen>
<Crossgen Condition="$([MSBuild]::IsOSPlatform(`Windows`))">$([System.IO.Path]::Combine($(CrossgenDir),"crossgen.exe"))</Crossgen>
</PropertyGroup>
</PropertyGroup>


<NETSdkError Condition="!Exists($(Crossgen))"
<NETSdkError Condition="!Exists($(Crossgen))"
ResourceName="UnableToFindResolvedPath"
ResourceName="UnableToFindResolvedPath"
FormatArguments="$(Crossgen)" />
FormatArguments="$(Crossgen)" />


<!-- Copy crossgen into the netcoreapp folder to ensure it can load Microsoft.DiaSymReader.Native when creating PDBs -->
<!-- Copy crossgen into the netcoreapp folder to ensure it can load Microsoft.DiaSymReader.Native when creating PDBs -->
<Copy SourceFiles="$(Crossgen)"
<Copy SourceFiles="$(Crossgen)"
DestinationFolder="$(_NetCoreRefDir)"
DestinationFolder="$(_NetCoreRefDir)"
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
Retries="$(CopyRetryCount)"
Retries="$(CopyRetryCount)"
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
UseHardlinksIfPossible="$(CreateHardLinksForPublishFilesIfPossible)"
UseHardlinksIfPossible="$(CreateHardLinksForPublishFilesIfPossible)"
UseSymboliclinksIfPossible="$(CreateSymbolicLinksForPublishFilesIfPossible)">
UseSymboliclinksIfPossible="$(CreateSymbolicLinksForPublishFilesIfPossible)">
<Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
<Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
</Copy>
</Copy>


<PropertyGroup>
<PropertyGroup>
<Crossgen>$([System.IO.Path]::GetFullPath($([System.IO.Path]::Combine($(_NetCoreRefDir), $([System.IO.Path]::GetFileName($(Crossgen)))))))</Crossgen>
<Crossgen>$([System.IO.Path]::GetFullPath($([System.IO.Path]::Combine($(_NetCoreRefDir), $([System.IO.Path]::GetFileName($(Crossgen)))))))</Crossgen>