<TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
</PropertyGroup>
- <Target Name="InvokeCrossgen"
- AfterTargets="Build">
+ <Target Name="PrepareForCrossgen">
<PropertyGroup>
<!-- Default for using Crossgen2 when not set externally -->
<UseCrossgen2 Condition="'$(UseCrossgen2)' == ''">true</UseCrossgen2>
<ExeExtension Condition="'$(OS)' == 'Windows_NT'">.exe</ExeExtension>
<DotNetCli>$([MSBuild]::NormalizePath('$(RepoRoot)', 'dotnet.sh'))</DotNetCli>
<DotNetCli Condition="'$(OS)' == 'Windows_NT'">$([MSBuild]::NormalizePath('$(RepoRoot)', 'dotnet.cmd'))</DotNetCli>
-
- <CoreLibAssemblyName>System.Private.CoreLib</CoreLibAssemblyName>
- <CoreLibInputPath>$([MSBuild]::NormalizePath('$(BinDir)', 'IL', '$(CoreLibAssemblyName).dll'))</CoreLibInputPath>
- <CoreLibOutputPath>$([MSBuild]::NormalizePath('$(BinDir)', '$(CoreLibAssemblyName).dll'))</CoreLibOutputPath>
</PropertyGroup>
<PropertyGroup>
<BuildPerfMap>false</BuildPerfMap>
<BuildPerfMap Condition="$(BuildDll) and '$(TargetOS)' == 'Linux'">true</BuildPerfMap>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <CoreLibAssemblyName>System.Private.CoreLib</CoreLibAssemblyName>
+ <CoreLibInputPath>$([MSBuild]::NormalizePath('$(BinDir)', 'IL', '$(CoreLibAssemblyName).dll'))</CoreLibInputPath>
+ <CoreLibOutputPath>$([MSBuild]::NormalizePath('$(BinDir)', '$(CoreLibAssemblyName).dll'))</CoreLibOutputPath>
+ <CoreLibNiPdbPath></CoreLibNiPdbPath>
+ <CoreLibPerfMapPath></CoreLibPerfMapPath>
+ <CoreLibNiPdbPath Condition="$(BuildPdb)">$([MSBuild]::NormalizePath('$(BinDir)', 'PDB', '$(CoreLibAssemblyName).ni.pdb'))</CoreLibNiPdbPath>
+ <CoreLibPerfMapPath Condition="$(BuildPerfMap)">$([MSBuild]::NormalizePath('$(BinDir)', '$(CoreLibAssemblyName).perf.map'))</CoreLibPerfMapPath>
+ </PropertyGroup>
+ </Target>
+ <Target Name="InvokeCrossgen"
+ DependsOnTargets="PrepareForCrossgen"
+ Inputs="$(CoreLibInputPath)"
+ Outputs="$(CoreLibOutputPath);$(CoreLibNiPdbPath);$(CoreLibPerfMapPath)"
+ AfterTargets="Build">
+
+ <PropertyGroup>
<CrossGen1Cmd>$([MSBuild]::NormalizePath('$(BinDir)', '$(CrossDir)', 'crossgen$(ExeExtension)'))</CrossGen1Cmd>
<CrossGen1Cmd>$(CrossGen1Cmd) /nologo</CrossGen1Cmd>
<CrossGen1Cmd>$(CrossGen1Cmd) <!-- IbcTuning --></CrossGen1Cmd>