[net11.0] Prevent bundling/linking with libclrjit.dylib for CoreCLR on Apple mobile platforms.#24429
Conversation
… Apple mobile platforms.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Pull request overview
This PR prevents the libclrjit.dylib library from being bundled and linked when using CoreCLR on Apple mobile platforms (iOS, tvOS, and Mac Catalyst), while still allowing it on macOS. The JIT compiler library is not needed on mobile platforms since CoreCLR uses the interpreter mode exclusively on these platforms.
Key changes:
- Added MSBuild logic to exclude
libclrjit.dylibfrom linking and publishing for CoreCLR on mobile platforms - Fixed a bug in test assertion logic that had swapped "added" and "removed" file messages
- Updated test expectations to reflect the ~3MB size reduction from removing
libclrjit.dylib
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
dotnet/targets/Xamarin.Shared.Sdk.targets |
Added two filtering operations to remove libclrjit.dylib - one for linking (_MonoLibrary) and one for publishing (ResolvedFileToPublish) when using CoreCLR on non-macOS platforms |
tests/dotnet/UnitTests/AppSizeTest.cs |
Fixed swapped logic in test assertions - correctly reports when files are "added" vs "removed" from app bundle |
tests/dotnet/UnitTests/expected/iOS-CoreCLR-Interpreter-size.txt |
Updated expected test output to reflect removal of libclrjit.dylib and the resulting ~3MB reduction in bundle size |
This comment has been minimized.
This comment has been minimized.
✅ [CI Build #bf0267e] Build passed (Build packages) ✅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 #bf0267e] 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.
💻 [CI Build #bf0267e] Tests on macOS X64 - Mac Sonoma (14) passed 💻✅ All tests on macOS X64 - Mac Sonoma (14) passed. Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
💻 [CI Build #bf0267e] Tests on macOS M1 - Mac Monterey (12) passed 💻✅ All tests on macOS M1 - Mac Monterey (12) passed. Pipeline on Agent |
💻 [CI Build #bf0267e] Tests on macOS arm64 - Mac Sequoia (15) passed 💻✅ All tests on macOS arm64 - Mac Sequoia (15) passed. Pipeline on Agent |
💻 [CI Build #bf0267e] 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.
💻 [CI Build #bf0267e] Tests on macOS arm64 - Mac Tahoe (26) passed 💻✅ All tests on macOS arm64 - Mac Tahoe (26) passed. Pipeline on Agent |
✅ [PR Build #bf0267e] Build passed (Detect API changes) ✅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 #bf0267e] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 139 tests passed 🎉 Tests counts✅ cecil: All 1 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
No description provided.