[tools] Ignore any interpreter settings when the current runtime isn't MonoVM. Fixes #20398. (#21406)

Tests that exercise this code path will be included in a different PR.

Fixes https://github.com/xamarin/xamarin-macios/issues/20398.
This commit is contained in:
Rolf Bjarne Kvinge 2024-10-11 09:32:15 +02:00 коммит произвёл GitHub
Родитель 22cb6e8cb2
Коммит 657f0169c5
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
2 изменённых файлов: 11 добавлений и 0 удалений

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

@ -546,6 +546,12 @@ namespace Xamarin.Bundler {
InterpretedAssemblies.AddRange (value.Split (new char [] { ',' }, StringSplitOptions.RemoveEmptyEntries));
}
public void UnsetInterpreter ()
{
UseInterpreter = false;
InterpretedAssemblies.Clear ();
}
#if !NET
public void ParseI18nAssemblies (string i18n)
{

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

@ -425,6 +425,11 @@ namespace Xamarin.Linker {
if (Driver.TargetFramework.Platform != Platform)
throw ErrorHelper.CreateError (99, "Inconsistent platforms. TargetFramework={0}, Platform={1}", Driver.TargetFramework.Platform, Platform);
if (Application.XamarinRuntime != XamarinRuntime.MonoVM && Application.UseInterpreter) {
Driver.Log (4, "The interpreter is enabled, but the current runtime isn't MonoVM. The interpreter settings will be ignored.");
Application.UnsetInterpreter ();
}
Driver.ValidateXcode (Application, false, false);
Application.InitializeCommon ();