-
Notifications
You must be signed in to change notification settings - Fork 511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set the IsDynamicCodeSupported
feature to false when using FullAOT
#18340
Comments
I can look into this. |
As the dotnet/runtime side has been merged in, we should try it out on xamarin .net8 branch once we start referencing the version including the change via something like: <DynamicCodeSupport Condition="'$(DynamicCodeSupport)' == '' and '$(UseInterpreter)' != 'true'">false</DynamicCodeSupport> |
When: dotnet/runtime#88539 gets merged in, it should additionally bring some size savings as more code will depend on the feature switch in question. UPDATE: The change is included in |
Fixed by 0c0e5d7 |
We need to set the
System.Runtime.CompilerServices.RuntimeFeature.IsDynamicCodeSupported
feature tofalse
when using FullAOT (i.e. AOT + no interpreter).This is done by setting the
DynamicCodeSupport
property tofalse
:https://github.com/dotnet/sdk/blob/9ca8336afab6247a22e745c2de4960e9b660d164/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets#L529-L532
The NativeAOT compiler does that here:
https://github.com/dotnet/sdk/blob/9ca8336afab6247a22e745c2de4960e9b660d164/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Publish.targets#L27
We need to do the same when using MonoAOT + no interpreter.
The text was updated successfully, but these errors were encountered: