[linker] Only consider [Preserve] (i.e. without any parameters) on assembly-level...
authorSebastien Pouliot <sebastien@xamarin.com>
Thu, 5 Feb 2015 20:20:55 +0000 (15:20 -0500)
committerSebastien Pouliot <sebastien@xamarin.com>
Thu, 5 Feb 2015 20:20:55 +0000 (15:20 -0500)
mcs/tools/tuner/Mono.Tuner/CustomizeActions.cs

index df6d4b31c6331e6c8a11ac91d40802747c1dee77..1bb6d6fb0e14801a6f750a69ab49737510b7e652 100644 (file)
@@ -35,6 +35,10 @@ namespace Mono.Tuner {
 
                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");
                }