Skip to content

[net11.0] Add ReadyToRun support for CoreCLR - #24327

Closed
kotlarmilos wants to merge 10 commits into
net11.0from
feature/coreclr-r2r
Closed

[net11.0] Add ReadyToRun support for CoreCLR#24327
kotlarmilos wants to merge 10 commits into
net11.0from
feature/coreclr-r2r

Conversation

@kotlarmilos

@kotlarmilos kotlarmilos commented Nov 26, 2025

Copy link
Copy Markdown
Member

Description

This PR adds ReadyToRun support for CoreCLR. The changes from dotnet/runtime#121824 must be included in the VMR for this to work.

Changes

  • Introduce ReadyToRun configuration in Xamarin.Shared.Sdk.props
  • Update bundler environment variables in Xamarin.Shared.Sdk.targets to support ReadyToRun
  • Add host_runtime_contract.h to the build process in Makefile
  • Update coreclr-bridge.m and runtime.m for R2R image handling and logging
  • Update runtime.h to reflect changes in the xamarin_pinvoke_override function signature
  • Enable CoreCLR tests run R2R

Fixes dotnet/runtime#120052

- Introduced ReadyToRun configuration in Xamarin.Shared.Sdk.props.
- Updated bundler environment variables in Xamarin.Shared.Sdk.targets to support ReadyToRun.
- Added host_runtime_contract.h to the build process in Makefile.
- Updated coreclr-bridge.m and runtime.m for R2R image handling and logging.
- Updated runtime.h to reflect changes in the xamarin_pinvoke_override function signature.
@kotlarmilos
kotlarmilos marked this pull request as draft November 26, 2025 10:28
@kotlarmilos kotlarmilos self-assigned this Nov 26, 2025
@kotlarmilos kotlarmilos changed the title Add ReadyToRun support for CoreCLR [net11.0] Add ReadyToRun support for CoreCLR Nov 26, 2025
@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

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

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

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
Copy Markdown
Collaborator

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

Pipeline on Agent
Hash: b3e5e42a2e153a2f1762586db67c4ba697a6e41f [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ [CI Build #b3e5e42] Build passed (Detect API changes) ✅

Pipeline on Agent
Hash: b3e5e42a2e153a2f1762586db67c4ba697a6e41f [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

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

Pipeline on Agent
Hash: b3e5e42a2e153a2f1762586db67c4ba697a6e41f [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
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: b3e5e42a2e153a2f1762586db67c4ba697a6e41f [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

❌ [CI Build #b3e5e42] Tests on macOS X64 - Mac Sonoma (14) failed ❌

Failed tests are:

  • linksdk
  • linkall

Pipeline on Agent
Hash: b3e5e42a2e153a2f1762586db67c4ba697a6e41f [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

❌ [CI Build #b3e5e42] Tests on macOS arm64 - Mac Sequoia (15) failed ❌

Failed tests are:

  • linksdk
  • linkall

Pipeline on Agent
Hash: b3e5e42a2e153a2f1762586db67c4ba697a6e41f [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

❌ [CI Build #b3e5e42] Tests on macOS M1 - Mac Monterey (12) failed ❌

Failed tests are:

  • linksdk
  • linkall

Pipeline on Agent
Hash: b3e5e42a2e153a2f1762586db67c4ba697a6e41f [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

❌ [CI Build #b3e5e42] Tests on macOS arm64 - Mac Tahoe (26) failed ❌

Failed tests are:

  • linksdk
  • linkall

Pipeline on Agent
Hash: b3e5e42a2e153a2f1762586db67c4ba697a6e41f [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

❌ [CI Build #b3e5e42] Tests on macOS M1 - Mac Ventura (13) failed ❌

Failed tests are:

  • linksdk
  • linkall

Pipeline on Agent
Hash: b3e5e42a2e153a2f1762586db67c4ba697a6e41f [PR build]

Comment thread runtime/runtime.m
"PINVOKE_OVERRIDE",
#endif
"TRUSTED_PLATFORM_ASSEMBLIES",
"NATIVE_DLL_SEARCH_DIRECTORIES",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is NATIVE_DLL_SEARCH_DIRECTORIES removed? It doesn't look related to R2R (it's also removed for Mono).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should revert that. I see it’s used for P/Invoke path resolution. I tried to reduce the scope when testing R2R and it wasn't needed for the MAUI sample.

@rolfbjarne

Copy link
Copy Markdown
Member

Closing in favor of #24437.

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.

3 participants