Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Pouliot <sebastien@xamarin.com>2015-04-22 04:29:56 +0300
committerSebastien Pouliot <sebastien@xamarin.com>2015-06-20 04:09:15 +0300
commit8fa5a7941858982cae75fdc7d88300c741d2ee26 (patch)
treee39c9c33e540a405523e692edba464ce64e84fe3
parentb1f8770840741e2411040263a6b14369d1ed63d4 (diff)
[linker] Resolve AssemblyName[Reference] when sweeping [#29211]mono-4.0.0-branch-sr1-ios9
The exact name (e.g. version) might differ between the original AssemblyNameReference and the one being used (e.g. PCL). To make sure we remove unused references we need to resolve the AssemblyNameReference into AssemblyDefinition and then continue the sweep based on the _new_ AssemblyNameReference.
-rw-r--r--mcs/tools/linker/Mono.Linker.Steps/SweepStep.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/mcs/tools/linker/Mono.Linker.Steps/SweepStep.cs b/mcs/tools/linker/Mono.Linker.Steps/SweepStep.cs
index d7be23ac9e3..808d09255fe 100644
--- a/mcs/tools/linker/Mono.Linker.Steps/SweepStep.cs
+++ b/mcs/tools/linker/Mono.Linker.Steps/SweepStep.cs
@@ -100,7 +100,8 @@ namespace Mono.Linker.Steps {
var references = assembly.MainModule.AssemblyReferences;
for (int i = 0; i < references.Count; i++) {
var reference = references [i];
- if (!AreSameReference (reference, target.Name))
+ var r = Context.Resolver.Resolve (reference);
+ if (!AreSameReference (r.Name, target.Name))
continue;
references.RemoveAt (i);