Skip to content

[xabt] enable R2R Composite by default for CoreCLR in Release - #10245

Merged
grendello merged 3 commits into
mainfrom
dev/peppers/r2r-release-default
Jun 30, 2025
Merged

[xabt] enable R2R Composite by default for CoreCLR in Release#10245
grendello merged 3 commits into
mainfrom
dev/peppers/r2r-release-default

Conversation

@jonathanpeppers

@jonathanpeppersjonathanpeppers commented Jun 24, 2025

Copy link
Copy Markdown
Member

Context: #10007

Just like we enable $(RunAOTCompilation) and $(AndroidEnableProfiledAot) in Release mode by default for Mono, we should enable R2R composite for CoreCLR.

"One weird trick" we're doing is to set $(_IsPublishing) by default, so the correct packs can be restored & ran during a dotnet build. We were already doing this for NativeAOT, so hoping the same trick will work for CoreCLR.

I also updated the BasicApplicationPublishReadyToRun() test to verify these defaults are working as expected.

Context: #10007
Just like we enable `$(RunAOTCompilation)` and
`$(AndroidEnableProfiledAot)` in `Release` mode by default for Mono,
we should enable R2R composite for CoreCLR.
"One weird trick" we're doing is to set `$(_IsPublishing)` by default,
so the correct packs can be restored & ran during a `dotnet build`. We
were already doing this for NativeAOT, so hoping the same trick will
work for CoreCLR.
I also updated the `BasicApplicationPublishReadyToRun()` test to
verify these defaults are working as expected.
<PublishReadyToRun Condition=" '$(PublishReadyToRun)' == '' and '$(Configuration)' == 'Release' ">true</PublishReadyToRun>
<PublishReadyToRunComposite Condition=" '$(PublishReadyToRunComposite)' == '' and '$(PublishReadyToRun)' == 'true' ">true</PublishReadyToRunComposite>
<_IsPublishing Condition=" '$(_IsPublishing)' == '' and '$(PublishReadyToRun)' == 'true' ">true</_IsPublishing>
<AllowReadyToRunWithoutRuntimeIdentifier Condition=" '$(PublishReadyToRun)' == 'true' and '$(RuntimeIdentifiers)' != '' ">true</AllowReadyToRunWithoutRuntimeIdentifier>

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this is required for multi-RID builds:

(_CheckForUnsupportedAppHostUsage target) -> C:\a\_work\1\s\bin\Release\dotnet\sdk\10.0.100-preview.6.25304.106\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(219,5):
error NETSDK1191: A runtime identifier for the property 'PublishReadyToRun' couldn't be inferred. Specify a rid explicitly. 

@jonathanpeppers
jonathanpeppers marked this pull request as ready for review June 27, 2025 18:00
@grendello
grendello merged commit 9861b57 into mainJun 30, 2025
@grendello
grendello deleted the dev/peppers/r2r-release-default branch June 30, 2025 08:37
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Jul 30, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@jonathanpeppers@grendello