Skip to content

[net11.0] Prevent bundling/linking with libclrjit.dylib for CoreCLR on Apple mobile platforms.#24429

Merged
rolfbjarne merged 1 commit intonet11.0from
dev/rolf/libclrjit-removal
Dec 12, 2025
Merged

[net11.0] Prevent bundling/linking with libclrjit.dylib for CoreCLR on Apple mobile platforms.#24429
rolfbjarne merged 1 commit intonet11.0from
dev/rolf/libclrjit-removal

Conversation

@rolfbjarne
Copy link
Member

No description provided.

@vs-mobiletools-engineering-service2

This comment has been minimized.

Copy link
Contributor

Copilot AI left a 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 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.dylib from 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

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [CI Build #bf0267e] Build passed (Build packages) ✅

Pipeline on Agent
Hash: bf0267e16ee4bc456bdbd743d3be5e7304a2b309 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [CI Build #bf0267e] Build passed (Build macOS tests) ✅

Pipeline on Agent
Hash: bf0267e16ee4bc456bdbd743d3be5e7304a2b309 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #bf0267e] Tests on macOS X64 - Mac Sonoma (14) passed 💻

All tests on macOS X64 - Mac Sonoma (14) passed.

Pipeline on Agent
Hash: bf0267e16ee4bc456bdbd743d3be5e7304a2b309 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #bf0267e] Tests on macOS M1 - Mac Monterey (12) passed 💻

All tests on macOS M1 - Mac Monterey (12) passed.

Pipeline on Agent
Hash: bf0267e16ee4bc456bdbd743d3be5e7304a2b309 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #bf0267e] Tests on macOS arm64 - Mac Sequoia (15) passed 💻

All tests on macOS arm64 - Mac Sequoia (15) passed.

Pipeline on Agent
Hash: bf0267e16ee4bc456bdbd743d3be5e7304a2b309 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #bf0267e] Tests on macOS M1 - Mac Ventura (13) passed 💻

All tests on macOS M1 - Mac Ventura (13) passed.

Pipeline on Agent
Hash: bf0267e16ee4bc456bdbd743d3be5e7304a2b309 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@rolfbjarne rolfbjarne enabled auto-merge (squash) December 12, 2025 15:19
@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #bf0267e] Tests on macOS arm64 - Mac Tahoe (26) passed 💻

All tests on macOS arm64 - Mac Tahoe (26) passed.

Pipeline on Agent
Hash: bf0267e16ee4bc456bdbd743d3be5e7304a2b309 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [PR Build #bf0267e] Build passed (Detect API changes) ✅

Pipeline on Agent
Hash: bf0267e16ee4bc456bdbd743d3be5e7304a2b309 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ API diff for current PR / commit

NET (empty diffs)

✅ API diff vs stable

NET (empty diffs)

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: bf0267e16ee4bc456bdbd743d3be5e7304a2b309 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

🚀 [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
✅ dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (macOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (tvOS): All 1 tests passed. [attempt 2] Html Report (VSDrops) Download
✅ framework: All 2 tests passed. [attempt 2] Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 5 tests passed. [attempt 2] Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 9 tests passed. Html Report (VSDrops) Download
✅ linker: All 44 tests passed. [attempt 2] Html Report (VSDrops) Download
✅ monotouch (iOS): All 13 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 17 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 12 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 13 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ windows: All 3 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

Pipeline on Agent
Hash: bf0267e16ee4bc456bdbd743d3be5e7304a2b309 [PR build]

@rolfbjarne rolfbjarne merged commit dcd9aa4 into net11.0 Dec 12, 2025
50 of 51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments