2 using System.Collections;
3 using System.Collections.Generic;
8 using Mono.Linker.Steps;
13 namespace Mono.Tuner {
15 public class CustomizeActions : BaseStep {
17 readonly bool link_sdk_only;
18 readonly HashSet<string> skipped_assemblies;
20 public CustomizeActions (bool link_sdk_only, IEnumerable<string> skipped_assemblies)
22 this.link_sdk_only = link_sdk_only;
23 this.skipped_assemblies = new HashSet<string> (skipped_assemblies);
26 protected override void ProcessAssembly (AssemblyDefinition assembly)
28 if (IsSkipped (assembly)) {
29 ProcessUserAssembly (assembly);
34 if (!Annotations.HasAction (assembly)) // stray assembly not picked up when resolving references
35 Annotations.SetAction (assembly, AssemblyAction.Link);
40 if (Profile.IsSdkAssembly (assembly) || Profile.IsProductAssembly (assembly)) {
41 Annotations.SetAction (assembly, AssemblyAction.Link);
45 ProcessUserAssembly (assembly);
48 bool IsSkipped (AssemblyDefinition assembly)
50 return skipped_assemblies.Contains (assembly.Name.Name);
53 void ProcessUserAssembly (AssemblyDefinition assembly)
55 ResolveFromAssemblyStep.ProcessLibrary (Context, assembly);