[net11.0] [dotnet] Fix computing _LibMonoLinkMode when not using Mono.#24488
[net11.0] [dotnet] Fix computing _LibMonoLinkMode when not using Mono.#24488rolfbjarne merged 1 commit intonet11.0from
Conversation
In particular use static libraries when using any runtime on device.
There was a problem hiding this comment.
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.