Skip to content

Commit

Permalink
crossgen-corelib should prefer ILC'd crossgen
Browse files Browse the repository at this point in the history
  • Loading branch information
agocke committed Sep 20, 2024
1 parent 7437327 commit b4b1060
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion eng/Subsets.props
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@
$(CoreClrProjectRoot)tools\r2rtest\R2RTest.csproj;
$(CoreClrProjectRoot)tools\PdbChecker\PdbChecker.csproj;
$(CoreClrProjectRoot)tools\AssemblyChecker\AssemblyChecker.csproj" Category="clr" Condition="'$(DotNetBuildSourceOnly)' != 'true'"/>
<ProjectToBuild Include="$(CoreClrProjectRoot)tools\aot\crossgen2\crossgen2.csproj" Category="clr" />
<ProjectToBuild Include="$(CoreClrProjectRoot)tools\aot\crossgen2\crossgen2_publish.csproj" Category="clr" />
<ProjectToBuild Include="$(CoreClrProjectRoot)tools\aot\ILCompiler.Build.Tasks\ILCompiler.Build.Tasks.csproj" Category="clr" Condition="'$(NativeAotSupported)' == 'true'" />
<ProjectToBuild Include="$(CoreClrProjectRoot)tools\aot\ILCompiler\ILCompiler.csproj" Category="clr" Condition="'$(NativeAotSupported)' == 'true'" />
<ProjectToBuild Include="$(CoreClrProjectRoot)nativeaot\BuildIntegration\BuildIntegration.proj" Category="clr" Condition="'$(NativeAotSupported)' == 'true'" />
Expand Down
15 changes: 10 additions & 5 deletions src/coreclr/crossgen-corelib.proj
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
</PropertyGroup>

<ItemGroup>
<ProjectReference Condition="'$(UseCrossArchCrossgen2)' != 'true'" Include="$(CoreClrProjectRoot)/tools/aot/crossgen2/crossgen2.csproj" OutputItemType="Crossgen2" />
<ProjectReference Condition="'$(UseCrossArchCrossgen2)' == 'true'" Include="$(CoreClrProjectRoot)/tools/aot/crossgen2/crossgen2_crossarch.csproj" OutputItemType="Crossgen2" />
<ProjectReference Condition="'$(UseCrossArchCrossgen2)' != 'true'" Include="$(CoreClrProjectRoot)/tools/aot/crossgen2/crossgen2_publish.csproj" ReferenceOutputAssembly="false" />
<ProjectReference Condition="'$(UseCrossArchCrossgen2)' == 'true'" Include="$(CoreClrProjectRoot)/tools/aot/crossgen2/crossgen2_crossarch.csproj" />
<ProjectReference Include="$(CoreClrProjectRoot)/tools/dotnet-pgo/dotnet-pgo.csproj" OutputItemType="DotNetPgo" Condition="'$(DotNetBuildSourceOnly)' != 'true'" />
<ProjectReference Include="$([MSBuild]::NormalizePath('$(CoreClrProjectRoot)', 'System.Private.CoreLib', 'System.Private.CoreLib.csproj'))" OutputItemType="CoreLib" />
</ItemGroup>
Expand Down Expand Up @@ -100,10 +100,14 @@
</ItemGroup>

<PropertyGroup>
<Crossgen2OutputPath>%(Crossgen2.RootDir)%(Crossgen2.Directory)</Crossgen2OutputPath>
<Crossgen2OutputPath>$(Crossgen2Dir)</Crossgen2OutputPath>
<Crossgen2OutputPath Condition="'$(UseCrossArchCrossgen2)' == 'true'">$(Crossgen2CrossDir)</Crossgen2OutputPath>
</PropertyGroup>
<ItemGroup>
<Crossgen2Files Include="$(Crossgen2OutputPath)/*.dll;$(Crossgen2OutputPath)/*.so;$(Crossgen2OutputPath)/*.dylib" />
<Crossgen2Files Include="$(Crossgen2OutputPath)/crossgen2$(ExeSuffix)" />
<Crossgen2Files Include="$(Crossgen2OutputPath)/*.dll" />
<Crossgen2Files Include="$(Crossgen2OutputPath)/*.so" />
<Crossgen2Files Include="$(Crossgen2OutputPath)/*.dylib" />
</ItemGroup>
</Target>

Expand All @@ -120,7 +124,8 @@
Text="Generating native image of System.Private.CoreLib for $(OSPlatformConfig). Logging to $(CrossGenCoreLibLog)" />

<PropertyGroup>
<CrossGenDllCmd>$(DotNetCli) @(Crossgen2)</CrossGenDllCmd>
<CrossGenDllCmd>$(Crossgen2OutputPath)/crossgen2$(ExeSuffix)</CrossGenDllCmd>
<CrossGenDllCmd Condition="'$(UseCrossArchCrossgen2)' == 'true'">$(DotNetCli) "$(Crossgen2OutputPath)/crossgen2.dll"</CrossGenDllCmd>
<CrossGenDllCmd>$(CrossGenDllCmd) -o:$(CoreLibOutputPath)</CrossGenDllCmd>
<CrossGenDllCmd>$(CrossGenDllCmd) -r:$([MSBuild]::NormalizePath('$(BinDir)', 'IL', '*.dll'))</CrossGenDllCmd>
<CrossGenDllCmd>$(CrossGenDllCmd) --targetarch:$(TargetArchitecture)</CrossGenDllCmd>
Expand Down

0 comments on commit b4b1060

Please sign in to comment.