CoreCLR: Compute and pass instruction set to crossgen2 based on deployment target#24621
CoreCLR: Compute and pass instruction set to crossgen2 based on deployment target#24621rolfbjarne merged 18 commits intonet11.0from
Conversation
rolfbjarne
left a comment
There was a problem hiding this comment.
Change the target branch to net11.0 instead of main, and move the _ComputeInstructionSetForCrossgen2 target to the Microsoft.Sdk.R2R.targets file.
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.
Done. Changed the base branch to net11.0 and moved the _ComputeInstructionSetForCrossgen2 target to Microsoft.Sdk.R2R.targets (commit 28b27d80d). |
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.
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.
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.
💻 [CI Build #ac2a65b] Tests on macOS M1 - Mac Monterey (12) passed 💻✅ All tests on macOS M1 - Mac Monterey (12) passed. Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
💻 [CI Build #ac2a65b] Tests on macOS M1 - Mac Ventura (13) passed 💻✅ All tests on macOS M1 - Mac Ventura (13) passed. Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
This needs a dotnet bump (#24651) first, because the size test apps are now trimmed, so we need the fix for dotnet/runtime#123953. |
…ction-set-support
✅ [PR Build #266f35b] Build passed (Detect API changes) ✅Pipeline on Agent |
✅ [CI Build #266f35b] Build passed (Build packages) ✅Pipeline on Agent |
✅ 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 |
✅ [CI Build #266f35b] Build passed (Build macOS tests) ✅Pipeline on Agent |
💻 [CI Build #266f35b] Tests on macOS X64 - Mac Sonoma (14) passed 💻✅ All tests on macOS X64 - Mac Sonoma (14) passed. Pipeline on Agent |
💻 [CI Build #266f35b] Tests on macOS arm64 - Mac Sequoia (15) passed 💻✅ All tests on macOS arm64 - Mac Sequoia (15) passed. Pipeline on Agent |
💻 [CI Build #266f35b] Tests on macOS arm64 - Mac Tahoe (26) passed 💻✅ All tests on macOS arm64 - Mac Tahoe (26) passed. 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.
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.
🚀 [CI Build #266f35b] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 117 tests passed 🎉 Tests counts✅ cecil: All 1 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
Implementation Plan
Summary
This PR implements support for computing the minimum instruction set an app requires based on the deployment target (
SupportedOSPlatformVersion) and runtime identifier, and passes this information to the R2R/NAOT compiler (crossgen2) via the--instruction-setargument.All feedback addressed:
net11.0Microsoft.Sdk.R2R.targetsComputeInstructionSetForReadyToRunwith documentationImplementation Details
ComputeInstructionSet MSBuild Task:
RuntimeIdentifier,SupportedOSPlatformVersion(alphabetically sorted)DeviceInfodictionary: device → (CPU, max OS version)SdkVersions.iOS/SdkVersions.TVOSfor latest OSIntegration:
_ComputeInstructionSetForCrossgen2inMicrosoft.Sdk.R2R.targetsPublishReadyToRun=trueandComputeInstructionSetForReadyToRun != false_DetectSdkLocationsResolveReadyToRunCompilers--instruction-set:value(with duplicate check)Documentation:
ComputeInstructionSetForReadyToRunproperty indocs/building-apps/build-properties.mdtrueTesting:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.