Skip to content

Trimming and extensions compatibility design – discussion #86649

Closed

Description

Description

Xamarin is heavily dependent on ILLinker and use of custom linker steps in mobile platform builds.

This dependency means that if we want to support building an application targeting iOS-like platforms with NativeAOT, we would have to run ILLinker and ILCompiler (NativeAOT's compiler and trimmer) in cascade during the build.
For such scenarios, the compatibility between the tools arises as an issue, for example:

  • System.Private.CoreLib.dll trimmed by ILLinker cannot be used with ILCompiler, as it requires Array<T> type for compilation, which gets removed in the previous step.
  • Additionally, it can also happen that ILCompiler will trim IL and/or metadata specifically preserved by ILLinker that is required for the application to run.

To use the full potential of both of the tools, we need to make them compatible (to some extent) for targeting mobile devices.

This issue has been opened: to identify how we can reduce the incompatibility gap, to discuss possible approaches, ideas and suggestions on how to get pass this limitation in general with a goal of enabling NativeAOT to work with Xamarin.

Implementation

The implementation of the identified work is being tracked: xamarin/xamarin-macios#18584


/cc: @rolfbjarne @simonrozsival

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status

      No status

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions