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
Context: 8d739f4
Context: ec0cbcf
Make it possible to enable marshal methods in CoreCLR apps in the
Release configuration by setting `$(AndroidEnableMarshalMethods)=true`.
Note: It is not necessary to set
`$(_AndroidUseManagedMarshalMethodsLookup)=true` manually when using
CoreCLR, as it is the only marshal methods lookup method supported.
To make this work:
Add `xamarin_app_init` to the P/Invoke overrides.
The configuration flags are now set and propagated correctly during
initialization to ensure that the `xamarin_app_init` method is called
when `$(AndroidEnableMarshalMethods)=true`.
Update `MarshalMethodsAssemblyRewriter` to no longer emit `_mm_wrapper`
methods around methods which already have `[UnmanagedCallersOnly]`.
There was a bug in 8d739f4 which created a `n_Activate_mm_mm_wrapper`
method which called the hand-written `n_Activate_mm` UCO. This wasn't
caught earlier because Mono does not throw when a managed function
calls a UCO. On CoreCLR, this codepath failed with:
Invalid Program: attempted to call a UnmanagedCallersOnly method from managed code.
log.LogDebugMessage($"[{targetArch}] Method '{method.NativeCallback.FullName}' does not need a wrapper, it already has UnmanagedCallersOnlyAttribute");
0 commit comments