diff --git a/src/Microsoft.Android.Sdk.ILLink/SetupStep.cs b/src/Microsoft.Android.Sdk.ILLink/SetupStep.cs index 90a54844109..fcc2fe64fb5 100644 --- a/src/Microsoft.Android.Sdk.ILLink/SetupStep.cs +++ b/src/Microsoft.Android.Sdk.ILLink/SetupStep.cs @@ -27,8 +27,6 @@ List Steps { } } - static MethodInfo getReferencedAssembliesMethod = typeof (LinkContext).GetMethod ("GetReferencedAssemblies", BindingFlags.Public | BindingFlags.Instance); - List MarkHandlers { get { if (_markHandlers == null) { @@ -50,22 +48,15 @@ protected override void Process () new PreserveExportedTypes () })); + var cache = new TypeDefinitionCache (); MarkHandlers.Add (new MarkJavaObjects ()); MarkHandlers.Add (new PreserveJavaExceptions ()); MarkHandlers.Add (new PreserveApplications ()); - var cache = new TypeDefinitionCache (); MarkHandlers.Add (new PreserveRegistrations (cache)); MarkHandlers.Add (new PreserveJavaInterfaces ()); MarkHandlers.Add (new FixAbstractMethodsHandler (cache)); - // temporary workaround: this call forces illink to process all the assemblies - if (getReferencedAssembliesMethod == null) - throw new InvalidOperationException ($"Temporary linker workaround failed, {nameof (getReferencedAssembliesMethod)} is null."); - - foreach (var assembly in (IEnumerable)getReferencedAssembliesMethod.Invoke (Context, null)) - Context.LogMessage ($"Reference assembly to process: {assembly}"); - string proguardPath; if (Context.TryGetCustomData ("ProguardConfiguration", out proguardPath)) InsertAfter (new GenerateProguardConfiguration (proguardPath), "CleanStep");