Skip to content

Commit

Permalink
Clean up comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sbomer committed May 6, 2021
1 parent 11733b9 commit 7362b74
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 2 additions & 5 deletions tools/dotnet-linker/SetupStep.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,13 @@ protected override void TryProcess ()
// though we know that sdk assemblies will never have Preserve attributes, user assemblies may have
// [assembly: LinkSafe] attributes, which means we treat them as sdk assemblies and those may have
// Preserve attributes.
// TODO: LinkSafeAttribute doesn't appear to be handled anywhere. Is this attribute still supported?
// ApplyPreserveAttribute no longer runs on all assemblies. [assembly: Preserve (typeof (SomeAttribute))] will
// no longer give SomeAttribute "Preserve" semantics.
MarkHandlers.Add (new DotNetMarkAssemblySubStepDispatcher (new ApplyPreserveAttribute ()));
MarkHandlers.Add (new OptimizeGeneratedCodeHandler ());
// MarkNSObjects will run for all marked assemblies.
MarkHandlers.Add (new DotNetMarkAssemblySubStepDispatcher (new MarkNSObjects ()));
MarkHandlers.Add (new PreserveSmartEnumConversionsHandler ());

// TODO: these steps should probably run after mark.
// This step could be run after Mark to avoid tracking all members:
// https://github.com/xamarin/xamarin-macios/issues/11447
pre_mark_substeps.Add (new CollectUnmarkedMembersSubStep ());
pre_mark_substeps.Add (new StoreAttributesStep ());

Expand Down
2 changes: 2 additions & 0 deletions tools/linker/ApplyPreserveAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ void ProcessAssemblyAttributes (AssemblyDefinition assembly)
}
}

// In .NET6, ApplyPreserveAttribute no longer runs on all assemblies.
// [assembly: Preserve (typeof (SomeAttribute))] no longer gives SomeAttribute "Preserve" semantics.
#if !NET
// if the type is a custom attribute then it means we want to preserve what's decorated
// with this attribute (not just the attribute alone)
Expand Down

0 comments on commit 7362b74

Please sign in to comment.