You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Xamarin.Android.Build.Tasks] make "managed typemap" runtime agnostic (#9911)
Context: 684ede6
Context: b11471b
For NativeAOT, we implemented a "managed" typemap that is trimmer-safe;
see 684ede6 and b11471b.
In order to test its performance characteristics, make this typemap
useable for Mono and CoreCLR as well:
* Move `NativeAotTypeManager`, `NativeAotValueManager`, and
`TypeMapping` types to `Mono.Android.dll`
* Rename `NativeAot*` types to `Managed*`
* Add a new private `$(_AndroidTypeMapImplementation)` MSBuild
property that can be set to `llvm-ir` or `managed`.
* Add a new trimmer feature flag
`Microsoft.Android.Runtime.RuntimeFeature.ManagedTypeMap`;
when `true` uses the managed typemap on any runtime.
I added a test that verifies `dotnet run` succeeds for all typemap
implementations.
Note that NativeAOT will *only* support the managed typemap.
Update `JNIEnvInit.RegisterJniNatives()` to *not* require that
`androidRuntime.TypeManager` be an `AndroidTypeManager`; this allows
`ManagedTypeManager` to be used on MonoVM and CoreCLR.
@@ -512,7 +512,7 @@ public override void RegisterNativeMembers (
512
512
[UnconditionalSuppressMessage("Trimming","IL2057",Justification="Type.GetType() can never statically know the string value parsed from parameter 'methods'.")]
513
513
[UnconditionalSuppressMessage("Trimming","IL2067",Justification="Delegate.CreateDelegate() can never statically know the string value parsed from parameter 'methods'.")]
514
514
[UnconditionalSuppressMessage("Trimming","IL2072",Justification="Delegate.CreateDelegate() can never statically know the string value parsed from parameter 'methods'.")]
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.DefaultProperties.targets
0 commit comments