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
Linker may decide to trim static .cctor from a class if it doesn't find a need to keep it. Calling System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor is in such case unsafe as it requires the static .cctor to be present to work correctly.
Linker should be able to analyze simple patterns calling the RunClassConstructor and include the necessary static .cctor. The minimum pattern to support should be:
Linker may decide to trim static
.cctor
from a class if it doesn't find a need to keep it. CallingSystem.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor
is in such case unsafe as it requires the static.cctor
to be present to work correctly.Linker should be able to analyze simple patterns calling the
RunClassConstructor
and include the necessary static.cctor
. The minimum pattern to support should be:Once implement we can basically revert this change in CoreLib dotnet/runtime#31718.
This is a preferred solution to the changes suggested in #966.
The text was updated successfully, but these errors were encountered: