Skip to content

Commit ccf556d

Browse files
github-actions[bot]sbomeragocke
authored
Fix interface trimming order (#114509)
Co-authored-by: Sven Boemer <sbomer@gmail.com> Co-authored-by: Andy Gocke <angocke@microsoft.com>
1 parent a2c3690 commit ccf556d

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/tools/illink/src/linker/Linker.Steps/MarkStep.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,8 +417,8 @@ bool ProcessPrimaryQueue ()
417417

418418
while (!QueueIsEmpty ()) {
419419
ProcessQueue ();
420-
ProcessInterfaceMethods ();
421420
ProcessMarkedTypesWithInterfaces ();
421+
ProcessInterfaceMethods ();
422422
ProcessDynamicCastableImplementationInterfaces ();
423423
ProcessPendingBodies ();
424424
DoAdditionalProcessing ();

src/tools/illink/test/Mono.Linker.Tests.Cases/Attributes/OnlyKeepUsed/MethodWithUnmanagedConstraint.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ namespace Mono.Linker.Tests.Cases.Attributes.OnlyKeepUsed
66
{
77
[SetupCSharpCompilerToUse ("csc")]
88
[SetupLinkerArgument ("--used-attrs-only", "true")]
9+
10+
// Necessary to allow trimming the attribute instance from types in CoreLib.
11+
[SetupLinkerTrimMode ("link")]
12+
// When we allow trimming CoreLib, some well-known types expected by ILVerify are removed.
13+
[SkipILVerify]
914
public class MethodWithUnmanagedConstraint
1015
{
1116
public static void Main ()

0 commit comments

Comments
 (0)