diff --git a/src/tools/illink/src/linker/Linker.Steps/MarkStep.cs b/src/tools/illink/src/linker/Linker.Steps/MarkStep.cs index 2e41771ee39634..ef88f6d4d007c4 100644 --- a/src/tools/illink/src/linker/Linker.Steps/MarkStep.cs +++ b/src/tools/illink/src/linker/Linker.Steps/MarkStep.cs @@ -417,8 +417,8 @@ bool ProcessPrimaryQueue () while (!QueueIsEmpty ()) { ProcessQueue (); - ProcessInterfaceMethods (); ProcessMarkedTypesWithInterfaces (); + ProcessInterfaceMethods (); ProcessDynamicCastableImplementationInterfaces (); ProcessPendingBodies (); DoAdditionalProcessing (); diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Attributes/OnlyKeepUsed/MethodWithUnmanagedConstraint.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Attributes/OnlyKeepUsed/MethodWithUnmanagedConstraint.cs index 6b58c1dbf0de9c..1a97ef3fa1e972 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Attributes/OnlyKeepUsed/MethodWithUnmanagedConstraint.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Attributes/OnlyKeepUsed/MethodWithUnmanagedConstraint.cs @@ -6,6 +6,11 @@ namespace Mono.Linker.Tests.Cases.Attributes.OnlyKeepUsed { [SetupCSharpCompilerToUse ("csc")] [SetupLinkerArgument ("--used-attrs-only", "true")] + + // Necessary to allow trimming the attribute instance from types in CoreLib. + [SetupLinkerTrimMode ("link")] + // When we allow trimming CoreLib, some well-known types expected by ILVerify are removed. + [SkipILVerify] public class MethodWithUnmanagedConstraint { public static void Main ()