-
Notifications
You must be signed in to change notification settings - Fork 554
[net11.0] [dotnet] Fix computing _LibMonoLinkMode when not using Mono. #24488
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
Conversation
In particular use static libraries when using any runtime on device.
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.
Pull request overview
This PR fixes the computation of _LibMonoLinkMode when not using the Mono runtime, ensuring that static libraries are used for device builds with NativeAOT. The change corrects the MSBuild logic to properly handle different runtime types (MonoVM, CoreCLR, NativeAOT) and platforms.
- Refactored
_LibMonoLinkModecomputation to properly handle NativeAOT and CoreCLR runtimes - Updated logic to enforce static linking for iOS/tvOS device builds (except temporary CoreCLR exception)
- Updated test expectations to reflect smaller app bundle size due to static linking
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| dotnet/targets/Xamarin.Shared.Sdk.targets | Refactored _LibMonoLinkMode conditions to properly differentiate between MonoVM, CoreCLR, and NativeAOT runtimes, ensuring static linking on device builds |
| tests/dotnet/UnitTests/expected/iOS-NativeAOT-size.txt | Updated expected app bundle size to reflect removal of dynamic libraries (.dylib files) in favor of static linking, reducing total size from 3.8 MB to 2.5 MB |
✅ [CI Build #e7646da] 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.
✅ [CI Build #e7646da] Build passed (Build macOS tests) ✅Pipeline on Agent |
💻 [CI Build #e7646da] Tests on macOS X64 - Mac Sonoma (14) passed 💻✅ All tests on macOS X64 - Mac Sonoma (14) passed. Pipeline on Agent |
💻 [CI Build #e7646da] Tests on macOS arm64 - Mac Sequoia (15) passed 💻✅ All tests on macOS arm64 - Mac Sequoia (15) passed. Pipeline on Agent |
💻 [CI Build #e7646da] 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.
🚀 [CI Build #e7646da] 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 |
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.
✅ [PR Build #e7646da] 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 |
In particular use static libraries when using any runtime on device.