You've already forked linux-packaging-mono
Imported Upstream version 5.18.0.142
Former-commit-id: 7467d4b717762eeaf652d77f1486dd11ffb1ff1f
This commit is contained in:
parent
e52655b4dc
commit
0abdbe5a7d
@@ -5,7 +5,8 @@ include ../../build/rules.make
|
||||
PROGRAM = cil-stringreplacer.exe
|
||||
NO_INSTALL = yes
|
||||
|
||||
ifeq ($(PROFILE),basic)
|
||||
API = $(filter basic build, $(PROFILE))
|
||||
ifdef API
|
||||
# It can be run using system .net during boostrap
|
||||
TARGET_NET_REFERENCE = v4.6
|
||||
# Trick to make it work during boostrap where it has to run with system
|
||||
|
@@ -41,6 +41,7 @@ public class Program
|
||||
public bool Verbose { get; set; }
|
||||
public List<string> ResourcesStrings { get; }
|
||||
public string ILFile { get; set; }
|
||||
public bool MonoMscorlib { get; set; }
|
||||
|
||||
public CmdOptions ()
|
||||
{
|
||||
@@ -61,6 +62,8 @@ public class Program
|
||||
v => options.Verbose = v != null },
|
||||
{ "ilreplace=", "File with IL code to be used instead",
|
||||
v => options.ILFile = v },
|
||||
{ "mscorlib-debug", "IL customizations for Mono's mscorlib",
|
||||
v => options.MonoMscorlib = v != null },
|
||||
};
|
||||
|
||||
List<string> extra;
|
||||
@@ -130,6 +133,10 @@ public class Program
|
||||
using (var assembly = AssemblyDefinition.ReadAssembly (assemblyLocation, readerParameters)) {
|
||||
foreach (var module in assembly.Modules) {
|
||||
foreach (var type in module.GetTypes ()) {
|
||||
if (options.MonoMscorlib && type.Name == "Debug" && type.Namespace == "System.Diagnostics") {
|
||||
type.Name = "DebugPrivate";
|
||||
}
|
||||
|
||||
foreach (var method in type.Methods) {
|
||||
if (!method.HasBody)
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user