Skip to content

Commit 693029b

Browse files
committed
Refactor ReadyToRun configuration for CoreCLR
1 parent 229c1e2 commit 693029b

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

dotnet/targets/Xamarin.Shared.Sdk.props

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,11 +214,16 @@
214214
</PropertyGroup>
215215

216216
<!-- ReadyToRun configuration for CoreCLR -->
217-
<PropertyGroup Condition="'$(UseMonoRuntime)' != 'true' And '$(PublishReadyToRun)' == 'true'">
218-
<PublishReadyToRunComposite>true</PublishReadyToRunComposite>
219-
<PublishReadyToRunContainerFormat>macho</PublishReadyToRunContainerFormat>
217+
<PropertyGroup Condition="'$(UseMonoRuntime)' == 'false' And '$(_PlatformName)' != 'macOS'">
218+
<PublishReadyToRun Condition="'$(PublishReadyToRun)' == ''">true</PublishReadyToRun>
219+
<PublishReadyToRunComposite Condition="'$(PublishReadyToRun)' == 'true'">true</PublishReadyToRunComposite>
220+
<PublishReadyToRunContainerFormat Condition="'$(PublishReadyToRun)' == 'true'">macho</PublishReadyToRunContainerFormat>
220221
</PropertyGroup>
221222

223+
<ItemGroup Condition="'$(UseMonoRuntime)' == 'false' And '$(_PlatformName)' != 'macOS' And '$(PublishReadyToRun)' != 'true'">
224+
<_BundlerEnvironmentVariables Include="DOTNET_ReadyToRun" Value="0" />
225+
</ItemGroup>
226+
222227
<!-- Compute _SdkIsSimulator from the RuntimeIdentifier -->
223228
<PropertyGroup>
224229
<_SdkIsSimulator Condition="'$(RuntimeIdentifier)' != '' And '$(_SdkIsSimulator)' == ''">$(RuntimeIdentifier.Contains('simulator'))</_SdkIsSimulator>

dotnet/targets/Xamarin.Shared.Sdk.targets

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1247,12 +1247,6 @@
12471247
"
12481248
/>
12491249
</ItemGroup>
1250-
1251-
<!-- CoreCLR: these are variables currently needed to make CoreCLR work -->
1252-
<ItemGroup Condition="'$(UseMonoRuntime)' == 'false' And '$(_PlatformName)' != 'macOS'">
1253-
<_BundlerEnvironmentVariables Include="DOTNET_ReadyToRun" Value="1" Condition="'$(PublishReadyToRun)' == 'true'" />
1254-
<_BundlerEnvironmentVariables Include="DOTNET_ReadyToRun" Value="0" Condition="'$(PublishReadyToRun)' != 'true'" />
1255-
</ItemGroup>
12561250
</Target>
12571251

12581252
<!-- App bundle creation tasks -->

0 commit comments

Comments
 (0)