[mono/mono] cff65d2a: [linker] Do not remove resources from mscorlib unless it's action is set to Link
| Newsgroups | gmane.comp.gnome.mono.patches |
|---|---|
| Message-ID | <000001424daddfd0-addf6666-9f0e-4064-b598-9b8ae7ec062a-000000@email.amazonses.com> |
Branch: refs/heads/master
Home: https://github.com/mono/mono
Compare: https://github.com/mono/mono/compare/a2850fc7dae0...cff65d2ae524
Commit: cff65d2ae52400e036e9b05c435c3dde18c7213a
Author: Sebastien Pouliot <[email protected]> (spouliot)
Date: 2013-11-12 18:56:15 GMT
URL: https://github.com/mono/mono/commit/cff65d2ae52400e036e9b05c435c3dde18c7213a
[linker] Do not remove resources from mscorlib unless it's action is set to Link
Changed paths:
M mcs/tools/tuner/Mono.Tuner/RemoveResources.cs
Modified: mcs/tools/tuner/Mono.Tuner/RemoveResources.cs
===================================================================
@@ -1,6 +1,4 @@
using System;
-using System.Collections.Generic;
-using System.Linq;
using Mono.Linker;
using Mono.Linker.Steps;
@@ -11,19 +9,23 @@ namespace Mono.Tuner {
public class RemoveResources : IStep {
- I18nAssemblies assemblies;
+ readonly I18nAssemblies assemblies;
public RemoveResources (I18nAssemblies assemblies)
{
this.assemblies = assemblies;
}
- public void Process (LinkContext context)
+ public virtual void Process (LinkContext context)
{
AssemblyDefinition assembly;
if (!context.TryGetLinkedAssembly ("mscorlib", out assembly))
return;
+ // skip this if we're not linking mscorlib, e.g. --linkskip=mscorlib
+ if (context.Annotations.GetAction (assembly) != AssemblyAction.Link)
+ return;
+
var resources = assembly.MainModule.Resources;
for (int i = 0; i < resources.Count; i++) {
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches