|
1 | 1 | <Project>
|
2 | 2 | <Target Name="ResolveReadyToRunCompilers" DependsOnTargets="ResolveRuntimeFilesFromLocalBuild">
|
| 3 | + <!-- The following property group can be simplified once runtime repo switches over to SDK 6.0 drop --> |
| 4 | + <PropertyGroup> |
| 5 | + <CrossDir></CrossDir> |
| 6 | + <CrossDir Condition="'$(BuildArchitecture)' != '$(TargetArchitecture)'">x64</CrossDir> |
| 7 | + <Crossgen2Dir>$(CoreCLRArtifactsPath)\$(CrossDir)\crossgen2</Crossgen2Dir> |
| 8 | + <Crossgen2Exe>$(Crossgen2Dir)\crossgen2$(ExeSuffix)</Crossgen2Exe> |
| 9 | + <PublishReadyToRunCrossgen2ExtraArgs>--targetarch:$(TargetArchitecture)</PublishReadyToRunCrossgen2ExtraArgs> |
| 10 | + |
| 11 | + <JitTargetOSComponent>unix</JitTargetOSComponent> |
| 12 | + <JitTargetOSComponent Condition="'$(TargetOS)' == 'windows'">win</JitTargetOSComponent> |
| 13 | + <JitBuildArchitecture>$(TargetArchitecture)</JitBuildArchitecture> |
| 14 | + <JitBuildArchitecture Condition="'$(CrossDir)' != ''">$(CrossDir)</JitBuildArchitecture> |
| 15 | + <JitLibrary>$(Crossgen2Dir)\$(LibPrefix)clrjit_$(JitTargetOSComponent)_$(TargetArchitecture)_$(JitBuildArchitecture)$(LibSuffix)</JitLibrary> |
| 16 | + </PropertyGroup> |
| 17 | + |
3 | 18 | <ItemGroup Condition="'$(RuntimeFlavor)' != 'Mono'">
|
4 | 19 | <_crossTargetJit Include="@(CoreCLRCrossTargetFiles)" Condition="'%(FileName)' == '$(LibPrefix)clrjit' and '%(Extension)' == '$(LibSuffix)'" />
|
5 | 20 | <_clrjit Include="@(RuntimeFiles)" Condition="'%(FileName)' == '$(LibPrefix)clrjit' and '%(Extension)' == '$(LibSuffix)'" />
|
|
16 | 31 | JitPath="@(_clrjit)"
|
17 | 32 | DiaSymReader="$(_diaSymReaderPathIfExists)" />
|
18 | 33 | </ItemGroup>
|
| 34 | + <ItemGroup> |
| 35 | + <Crossgen2Tool Include="$(Crossgen2Exe)" JitPath="$(JitLibrary)" /> |
| 36 | + </ItemGroup> |
| 37 | + </Target> |
| 38 | + |
| 39 | + <!-- Hack to patch DOTNET_ROOT for the duration of Crossgen2 compilation to unblock --> |
| 40 | + <!-- Crossgen2 bring-up before SDK 6.0 Preview 2 propagates to the runtime repo. --> |
| 41 | + <!-- https://github.com/dotnet/runtime/issues/48252 --> |
| 42 | + |
| 43 | + <PropertyGroup> |
| 44 | + <OriginalDotnetRootValue /> |
| 45 | + <DOTNET_ROOT /> |
| 46 | + </PropertyGroup> |
| 47 | + |
| 48 | + <Target Name="PatchDotnetRootBeforeRunningCrossgen2" BeforeTargets="_CreateR2RImages"> |
| 49 | + <PropertyGroup> |
| 50 | + <OriginalDotnetRootValue>$(DOTNET_ROOT)</OriginalDotnetRootValue> |
| 51 | + <DOTNET_ROOT>$(RepoRoot)</DOTNET_ROOT> |
| 52 | + </PropertyGroup> |
| 53 | + </Target> |
| 54 | + |
| 55 | + <Target Name="RestoreDotnetRootAfterRunningCrossgen2" AfterTargets="_CreateR2RImages"> |
| 56 | + <PropertyGroup> |
| 57 | + <DOTNET_ROOT>$(OriginalDotnetRootValue)</DOTNET_ROOT> |
| 58 | + </PropertyGroup> |
19 | 59 | </Target>
|
| 60 | + |
| 61 | + <!-- End of hack to patch DOTNET_ROOT for the duration of Crossgen2 compilation. --> |
| 62 | + <!-- This can be removed once the runtime repo rolled forward to .NET 6 Preview 2 SDK repo drop. --> |
| 63 | + <!-- https://github.com/dotnet/runtime/issues/48252 --> |
20 | 64 | </Project>
|
0 commit comments