Repository navigation
[CoreCLR] Limit ReadyToRun generic cycle expansion #12867
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,7 +5,7 @@ Microsoft.Android.Sdk.CoreCLR.targets | |
| This file contains the CoreCLR-specific MSBuild logic for .NET for Android. | ||
| *********************************************************************************************** | ||
| --> | ||
| <Project> | ||
| <Project TreatAsLocalProperty="PublishReadyToRunCrossgen2ExtraArgs"> | ||
|
|
||
| <UsingTask TaskName="Xamarin.Android.Tasks.GenerateMibcProfile" AssemblyFile="$(_XamarinAndroidBuildTasksAssembly)" /> | ||
|
|
||
|
|
@@ -25,6 +25,18 @@ This file contains the CoreCLR-specific MSBuild logic for .NET for Android. | |
| <AllowReadyToRunWithoutRuntimeIdentifier Condition=" '$(PublishReadyToRun)' == 'true' and '$(RuntimeIdentifiers)' != '' ">true</AllowReadyToRunWithoutRuntimeIdentifier> | ||
| </PropertyGroup> | ||
|
|
||
| <Target Name="_AndroidAddReadyToRunGenericCycleLimits" | ||
| BeforeTargets="_PrepareForReadyToRunCompilation" | ||
| Condition=" '$(AndroidApplication)' == 'true' and '$(PublishReadyToRun)' == 'true' "> | ||
| <!-- Bound recursive generic expansion while preserving explicit crossgen2 overrides. --> | ||
| <PropertyGroup> | ||
| <PublishReadyToRunCrossgen2ExtraArgs | ||
| Condition="!$([System.Text.RegularExpressions.Regex]::IsMatch('$(PublishReadyToRunCrossgen2ExtraArgs)', '(^|[;\s])--maxgenericcycle([:=;\s]|$)'))">$(PublishReadyToRunCrossgen2ExtraArgs);--maxgenericcycle:2</PublishReadyToRunCrossgen2ExtraArgs> | ||
| <PublishReadyToRunCrossgen2ExtraArgs | ||
| Condition="!$([System.Text.RegularExpressions.Regex]::IsMatch('$(PublishReadyToRunCrossgen2ExtraArgs)', '(^|[;\s])--maxgenericcyclebreadth([:=;\s]|$)'))">$(PublishReadyToRunCrossgen2ExtraArgs);--maxgenericcyclebreadth:1</PublishReadyToRunCrossgen2ExtraArgs> | ||
| </PropertyGroup> | ||
|
Comment on lines
+33
to
+37
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a way to do this without a bunch of inlined regex? Should we make a C# task for modifying
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sure, we can do that. let's first agree if we even want this as the default and if yes, I'll update the PR. |
||
| </Target> | ||
|
|
||
| <!-- Default feature switches --> | ||
| <ItemGroup> | ||
| <RuntimeHostConfigurationOption Include="Microsoft.Android.Runtime.RuntimeFeature.IsCoreClrRuntime" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AI keeps putting this
TreatAsLocalPropertyvalue for me, too, but it should just stop doing that.Can we update
copilot-instructions.mdto say that we don't care about global property override behavior (that's default MSBuild!) and most of the timeTreatAsLocalPropertyis not needed.