dotnet / dotnet/android

Migrate away from ILLink custom steps

Open
#10,842 3 comments 0 reactions 1 assignee Claimed by @sbomer View on GitHub
Area: Trimming
Dominant language
C#
Stars
2.1k
Forks
579
Avg merge
1d 21h
Merged PRs (30d)
257

Description

## Background

dotnet/runtime#107211 proposes moving ILLink custom steps out of the trimmer process to enable ILLink to be published trimmed and AOT compiled, transition from Mono.Cecil to System.Reflection.Metadata, and reduce the ILLink API surface.

This issue tracks the work in dotnet/android to migrate all custom steps registered via `_TrimmerCustomSteps`.

## Before MarkStep

- [x] `SetupStep` - eliminate (pass data via MSBuild properties) https://github.com/dotnet/android/pull/9662
- [x] `FixLegacyResourceDesignerStep` - https://github.com/dotnet/android/pull/11059

## During MarkStep

### Remaining legacy LLVM IR type map steps

These steps remain registered via `_TrimmerCustomSteps`, but do not need to be migrated. They can be removed when the legacy LLVM IR type map is retired:

- `PreserveSubStepDispatcher` / `PreserveExportedTypes`
- `MarkJavaObjects`
- `PreserveJavaExceptions`
- `PreserveApplications`
- `PreserveRegistrations`
- `PreserveJavaInterfaces`

This step still needs to be supported with the trimmable type map:

- [x] `FixAbstractMethodsStep` - https://github.com/dotnet/android/pull/11029

## After CleanStep

- [x] `AddKeepAlivesStep` - move to `AssemblyModifierPipeline` (https://github.com/dotnet/android/pull/10952)
- [x] `StripEmbeddedLibraries` (#10894)
- [x] `RemoveResourceDesignerStep` / `GetAssembliesStep` - (https://github.com/dotnet/android/pull/10977)
- [x] `GenerateProguardConfiguration` (#10694)
- [x] `WarnOnPreserveAttribute` (#10693)
- [x] `TypeMappingStep` - removed with the managed type map implementation (#12134)

## References

- Upstream proposal: dotnet/runtime#107211
- Custom step assembly: `src/Microsoft.Android.Sdk.ILLink/`
- Step registration: `src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.TypeMap.LlvmIr.targets`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.