Skip to content

Commit 657f016

Browse files
authored
[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 #20398.
1 parent 22cb6e8 commit 657f016

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

tools/common/Application.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,12 @@ public void ParseInterpreter (string value)
546546
InterpretedAssemblies.AddRange (value.Split (new char [] { ',' }, StringSplitOptions.RemoveEmptyEntries));
547547
}
548548

549+
public void UnsetInterpreter ()
550+
{
551+
UseInterpreter = false;
552+
InterpretedAssemblies.Clear ();
553+
}
554+
549555
#if !NET
550556
public void ParseI18nAssemblies (string i18n)
551557
{

tools/dotnet-linker/LinkerConfiguration.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,11 @@ public static LinkerConfiguration GetInstance (LinkContext context)
425425
if (Driver.TargetFramework.Platform != Platform)
426426
throw ErrorHelper.CreateError (99, "Inconsistent platforms. TargetFramework={0}, Platform={1}", Driver.TargetFramework.Platform, Platform);
427427

428+
if (Application.XamarinRuntime != XamarinRuntime.MonoVM && Application.UseInterpreter) {
429+
Driver.Log (4, "The interpreter is enabled, but the current runtime isn't MonoVM. The interpreter settings will be ignored.");
430+
Application.UnsetInterpreter ();
431+
}
432+
428433
Driver.ValidateXcode (Application, false, false);
429434

430435
Application.InitializeCommon ();

0 commit comments

Comments
 (0)