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

github.com/mono/linker.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Rozenfeld <erozen@microsoft.com>2017-11-04 02:05:14 +0300
committerMarek Safar <marek.safar@gmail.com>2017-11-15 15:18:31 +0300
commit4d2362d8083e3c71560ba1225d468a0080aeea27 (patch)
treebbde3fff0493a3754052c9b81fdc1e4893d2ebd6
parent7904df9fbc01621db581c7a53dd473b5f0de551a (diff)
Add a switch to specify action on user assemblies.
Add -u switch to specify action on user (non-core) assemblies similar to -c switch for core assemblies.
-rw-r--r--linker/Mono.Linker/Driver.cs5
-rw-r--r--linker/Mono.Linker/LinkContext.cs8
2 files changed, 12 insertions, 1 deletions
diff --git a/linker/Mono.Linker/Driver.cs b/linker/Mono.Linker/Driver.cs
index 16616b437..232f5b6d6 100644
--- a/linker/Mono.Linker/Driver.cs
+++ b/linker/Mono.Linker/Driver.cs
@@ -120,6 +120,9 @@ namespace Mono.Linker {
case 'c':
context.CoreAction = ParseAssemblyAction (GetParam ());
break;
+ case 'u':
+ context.UserAction = ParseAssemblyAction (GetParam ());
+ break;
case 'p':
AssemblyAction action = ParseAssemblyAction (GetParam ());
context.Actions [GetParam ()] = action;
@@ -275,6 +278,7 @@ namespace Mono.Linker {
{
LinkContext context = new LinkContext (pipeline);
context.CoreAction = AssemblyAction.Skip;
+ context.UserAction = AssemblyAction.Link;
context.OutputDirectory = "output";
return context;
}
@@ -294,6 +298,7 @@ namespace Mono.Linker {
Console.WriteLine (" --version Print the version number of the {0}", _linker);
Console.WriteLine (" -out Specify the output directory, default to `output'");
Console.WriteLine (" -c Action on the core assemblies, skip, copy or link, default to skip");
+ Console.WriteLine(" -u Action on the user assemblies, skip, copy or link, default to link");
Console.WriteLine (" -p Action per assembly");
Console.WriteLine (" -s Add a new step to the pipeline.");
Console.WriteLine (" -t Keep assemblies in which only type forwarders are referenced.");
diff --git a/linker/Mono.Linker/LinkContext.cs b/linker/Mono.Linker/LinkContext.cs
index 155e202c1..9a608f691 100644
--- a/linker/Mono.Linker/LinkContext.cs
+++ b/linker/Mono.Linker/LinkContext.cs
@@ -38,6 +38,7 @@ namespace Mono.Linker {
Pipeline _pipeline;
AssemblyAction _coreAction;
+ AssemblyAction _userAction;
Dictionary<string, AssemblyAction> _actions;
string _outputDirectory;
readonly Dictionary<string, string> _parameters;
@@ -71,6 +72,11 @@ namespace Mono.Linker {
set { _coreAction = value; }
}
+ public AssemblyAction UserAction {
+ get { return _userAction; }
+ set { _userAction = value; }
+ }
+
public bool LinkSymbols {
get { return _linkSymbols; }
set { _linkSymbols = value; }
@@ -247,7 +253,7 @@ namespace Mono.Linker {
} else if (IsCore (name)) {
action = _coreAction;
} else {
- action = AssemblyAction.Link;
+ action = _userAction;
}
_annotations.SetAction (assembly, action);