[Runtime] Skip code to verify the Mono version in .NET for Xamarin.Mac. (#13020)

1. We're not using Mono for macOS in .NET.
2. Even if we were, we're not using a system mono anymore, which means we can't run
   into unexpected mono versions at runtime.
This commit is contained in:
Rolf Bjarne Kvinge 2021-10-19 08:11:57 +02:00 коммит произвёл GitHub
Родитель fc26c72b2a
Коммит 7b74a82724
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 4 добавлений и 0 удалений

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

@ -110,14 +110,17 @@ namespace ObjCRuntime {
if (initialized)
return;
#if !NET
if (GC.MaxGeneration <= 0)
throw ErrorHelper.CreateError (8017, "The Boehm garbage collector is not supported. Please use SGen instead.");
VerifyMonoVersion ();
#endif
LookupInternalFunction<initialize_func> ("xamarin_initialize") ();
}
#if !NET
static void VerifyMonoVersion ()
{
// Verify that the system mono we're running against is of a supported version.
@ -150,6 +153,7 @@ namespace ObjCRuntime {
throw new NotSupportedException ($"This version of Xamarin.Mac requires Mono {required_version}, but found Mono {actual_version}.");
}
#endif
unsafe static void InitializePlatform (InitializationOptions* options)
{