Skip to content

Commit

Permalink
[linker] Only consider [Preserve] (i.e. without any parameters) on as…
Browse files Browse the repository at this point in the history
…sembly-level as meaning 'preserve everything inside this assembly'.
  • Loading branch information
spouliot committed Feb 5, 2015
1 parent 7b29d5a commit 7145c08
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mcs/tools/tuner/Mono.Tuner/CustomizeActions.cs
Expand Up @@ -35,6 +35,10 @@ protected override void ProcessAssembly (AssemblyDefinition assembly)

protected virtual bool IsPreservedAttribute (CustomAttribute attribute)
{
// [assembly: Preserve (type)] does not preserve all the code in the assembly, in fact it might
// not preserve anything in _this_ assembly, but something in a separate assembly (reference)
if (attribute.HasConstructorArguments)
return false;
return (attribute.AttributeType.Name == "PreserveAttribute");
}

Expand Down

0 comments on commit 7145c08

Please sign in to comment.