Imported Upstream version 4.0.1

Former-commit-id: 6d37e02debfe41dd5c13ba6f6a2428c8b1ff5e28
This commit is contained in:
Jo Shields
2015-04-26 19:10:23 +01:00
parent 3c1f479b9d
commit 7272927785
252 changed files with 16715 additions and 1176 deletions

View File

@@ -8,7 +8,6 @@
//
using System;
using System.IO;
using System.Reflection;
using Mono.Cecil;
@@ -17,7 +16,7 @@ namespace Mono.CilStripper {
class Program {
static void Main (string [] args)
static int Main (string [] args)
{
Header ();
@@ -35,11 +34,13 @@ namespace Mono.CilStripper {
Console.WriteLine ("Assembly {0} stripped out into {1}", file, output);
else
Console.WriteLine ("Assembly {0} stripped", file);
return 0;
} catch (TargetInvocationException tie) {
Console.WriteLine ("Error: {0}", tie.InnerException);
} catch (Exception e) {
Console.WriteLine ("Error: {0}", e);
}
return 1;
}
static void StripAssembly (AssemblyDefinition assembly, string output)

View File

@@ -144,6 +144,16 @@ namespace Mono.Linker.Steps {
scope = assembly.MainModule.Import (td).Scope;
hash.Add (tr, scope);
}
if (assembly.MainModule.HasExportedTypes) {
foreach (var et in assembly.MainModule.ExportedTypes) {
var td = et.Resolve ();
IMetadataScope scope = et.Scope;
if ((td != null) && Annotations.IsMarked (td)) {
scope = assembly.MainModule.Import (td).Scope;
hash.Add (td, scope);
}
}
}
// Resolve everything first before updating scopes.
// If we set the scope to null, then calling Resolve() on any of its

View File

@@ -41,8 +41,12 @@ install-bin-data:
install-frameworks:
$(MKINSTALLDIRS) $(DESTDIR)$(NETFRAMEWORK_DIR)/v$(FRAMEWORK_VERSION)/RedistList
$(INSTALL_DATA) frameworks/net_$(FRAMEWORK_VERSION).xml $(DESTDIR)$(NETFRAMEWORK_DIR)/v$(FRAMEWORK_VERSION)/RedistList/FrameworkList.xml
$(MKINSTALLDIRS) $(DESTDIR)$(NETFRAMEWORK_DIR)/v2.0/RedistList
$(INSTALL_DATA) frameworks/net_2.0.xml $(DESTDIR)$(NETFRAMEWORK_DIR)/v2.0/RedistList/FrameworkList.xml
$(MKINSTALLDIRS) $(DESTDIR)$(NETFRAMEWORK_DIR)/v3.0/RedistList
$(INSTALL_DATA) frameworks/net_3.0.xml $(DESTDIR)$(NETFRAMEWORK_DIR)/v3.0/RedistList/FrameworkList.xml
$(MKINSTALLDIRS) $(DESTDIR)$(NETFRAMEWORK_DIR)/v3.5/RedistList
$(INSTALL_DATA) frameworks/net_3.5.xml $(DESTDIR)$(NETFRAMEWORK_DIR)/v3.5/RedistList/FrameworkList.xml
$(MKINSTALLDIRS) $(DESTDIR)$(NETFRAMEWORK_DIR)/v4.0/RedistList
$(INSTALL_DATA) frameworks/net_4.0.xml $(DESTDIR)$(NETFRAMEWORK_DIR)/v4.0/RedistList/FrameworkList.xml
$(MKINSTALLDIRS) $(DESTDIR)$(NETFRAMEWORK_DIR)/v4.0/Profile/Client/RedistList