[net11.0] R2R-compile only System.Private.CoreLib for Debug CoreCLR arm64 builds - #25787
Conversation
…m64 builds Only apply the PublishReadyToRunCompositeRoots optimization for arm64 RuntimeIdentifiers, since it broke x64 builds. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR adjusts the custom ReadyToRun (R2R) MSBuild targets in dotnet/macios to re-introduce the “R2R only CoreLib” optimization, but scoped to -arm64 runtime identifiers to avoid re-breaking x64 builds (as happened in #25583).
Changes:
- Add
PublishReadyToRunCompositeRootsforSystem.Private.CoreLib.dllonly when$(RuntimeIdentifier)ends with-arm64. - Add a
_DedupUnrootedReadyToRunPublishtarget to remove_ReadyToRunCompositeUnrootedBuildInputitems fromResolvedFileToPublishwhen composite roots are present.
This comment has been minimized.
This comment has been minimized.
✅ [PR Build #8b56ee1] Build passed (Detect API changes) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ [PR Build #8b56ee1] Build passed (Build packages) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
✅ [PR Build #8b56ee1] Build passed (Build macOS tests) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@PureWeen This seems to fix the failure from dotnet/maui#35364 (comment) |
🚀 [CI Build #8b56ee1] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 280 tests passed 🎉 Tests counts✅ assembly-processing: All 1 tests passed. Html Report (VSDrops) Download macOS tests✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
…ons and re-enable the x64 CoreLib composite root (#25876) ## Description This PR improves R2R on Apple mobile in Debug. The first fix addresses the crossgen2 failure in #25867. The `_SelectR2RAssemblies` target excluded user assemblies from the ReadyToRun composite by bare file name, but loose assemblies copied into resource subfolders of the app bundle, such as Uno's `uno.ai.xamlgeneration.assets` tooling assets, have a `PublishFolderType` of Resource and an empty `NuGetPackageId`, so they were misclassified as user assemblies and added to `PublishReadyToRunExclude`. The second change re-enables the `System.Private.CoreLib` composite-root optimization on x64. That optimization was scoped to arm64 RuntimeIdentifiers in #25787 because it regressed x64 builds with a `System.Runtime.Intrinsics.Vector256` crash, but the underlying crossgen2 issue is fixed by dotnet/runtime#129975, now backported to release/11.0-preview6, so the arm64-only restriction is removed and `PublishReadyToRunCompositeRoots` is applied to all RuntimeIdentifiers again. Fixes #25867 Fixes #25734 --------- Co-authored-by: Milos Kotlar <kotlarmilos@gmail.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Re-applies the changes from #25583 (which was reverted because it broke x64 builds), but scoped to arm64 RuntimeIdentifiers only.
The
PublishReadyToRunCompositeRootsitem is now only added when$(RuntimeIdentifier)ends with-arm64, leaving x64 builds unaffected.🤖 Pull request created by Copilot