[dotnet-linker] Don't do anything in ManagedRegistrarStep unless the current registrar mode is 'ManagedStatic'.
This commit is contained in:
Родитель
bf639a99d7
Коммит
57d40d9cf1
|
@ -5,6 +5,7 @@ using System.Linq;
|
|||
|
||||
using Mono.Cecil;
|
||||
using Mono.Linker.Steps;
|
||||
using Xamarin.Tuner;
|
||||
|
||||
using Xamarin.Bundler;
|
||||
|
||||
|
@ -16,6 +17,14 @@ namespace Xamarin.Linker {
|
|||
get { return LinkerConfiguration.GetInstance (Context); }
|
||||
}
|
||||
|
||||
public DerivedLinkContext DerivedLinkContext {
|
||||
get { return Configuration.DerivedLinkContext; }
|
||||
}
|
||||
|
||||
public Application App {
|
||||
get { return DerivedLinkContext.App; }
|
||||
}
|
||||
|
||||
protected void Report (params Exception [] exceptions)
|
||||
{
|
||||
Report ((IList<Exception>) exceptions);
|
||||
|
|
|
@ -11,6 +11,9 @@ namespace Xamarin.Linker {
|
|||
protected override void TryProcessAssembly (AssemblyDefinition assembly)
|
||||
{
|
||||
base.TryProcessAssembly (assembly);
|
||||
|
||||
if (App.Registrar != RegistrarMode.ManagedStatic)
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,10 +23,24 @@ namespace Xamarin.Linker {
|
|||
exceptions.Add (exception);
|
||||
}
|
||||
|
||||
protected override void TryProcess ()
|
||||
{
|
||||
base.TryProcess ();
|
||||
|
||||
App.SelectRegistrar ();
|
||||
if (App.Registrar != RegistrarMode.ManagedStatic)
|
||||
return;
|
||||
}
|
||||
|
||||
protected override void TryEndProcess (out List<Exception>? exceptions)
|
||||
{
|
||||
base.TryEndProcess ();
|
||||
|
||||
if (App.Registrar != RegistrarMode.ManagedStatic) {
|
||||
exceptions = null;
|
||||
return;
|
||||
}
|
||||
|
||||
// Report back any exceptions that occurred during the processing.
|
||||
exceptions = this.exceptions;
|
||||
}
|
||||
|
@ -34,6 +48,9 @@ namespace Xamarin.Linker {
|
|||
protected override void TryProcessAssembly (AssemblyDefinition assembly)
|
||||
{
|
||||
base.TryProcessAssembly (assembly);
|
||||
|
||||
if (App.Registrar != RegistrarMode.ManagedStatic)
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче