[tools] Remove XAMCORE_4_0 condition in linker source. (#14091)

Thinks are working fine as-is (with this XAMCORE_4_0 variable set to false),
and I see no particular reason in the code to change it, nor does the original
implementation explain much (b2bcad7a94).

So just remove this XAMCORE_4_0 condition as if it had never existed.
This commit is contained in:
Rolf Bjarne Kvinge 2022-02-08 10:38:49 +01:00 коммит произвёл GitHub
Родитель 0df9fa98ef
Коммит e0f5cede53
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 3 добавлений и 5 удалений

Просмотреть файл

@ -356,8 +356,6 @@ namespace Xamarin.Bundler {
Console.WriteLine (format);
}
public const bool IsXAMCORE_4_0 = false;
public static bool IsDotNet {
get { return TargetFramework.IsDotNet; }
}

Просмотреть файл

@ -168,7 +168,7 @@ namespace Xamarin.Linker {
break;
}
if (!Driver.IsXAMCORE_4_0 && tr.Is ("System.Runtime.CompilerServices", "CompilerGeneratedAttribute")) {
if (tr.Is ("System.Runtime.CompilerServices", "CompilerGeneratedAttribute")) {
#if DEBUG
Console.WriteLine ("Assembly {0} : processing", assembly);
#endif
@ -725,7 +725,7 @@ namespace Xamarin.Linker {
if (method.IsBindingImplOptimizableCode (LinkContext)) {
// We optimize all methods that have the [BindingImpl (BindingImplAttributes.Optimizable)] attribute.
} else if (!Driver.IsXAMCORE_4_0 && (method.IsGeneratedCode (LinkContext) && (
} else if ((method.IsGeneratedCode (LinkContext) && (
#if NET
GetIsExtensionType (method.DeclaringType)
#else

Просмотреть файл

@ -132,7 +132,7 @@ namespace Xamarin.Linker {
if (IsBindingImplOptimizableCode (self, link_context))
return true;
if (!Driver.IsXAMCORE_4_0 && IsGeneratedCode (self, link_context))
if (IsGeneratedCode (self, link_context))
return true;
return false;