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-02 21:58:50 +0300
commit955b2d61c94febefd497796aab75de8540cb8bbd (patch)
tree90dcea93c260e34940a7a4808c4813b1895ec789
parentd64e196394c0aaba811277b2fbf432f11b8c7233 (diff)
[linker] Resolve AssemblyName[Reference] when sweeping [#29211]
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);