diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/Aot.cs b/src/Xamarin.Android.Build.Tasks/Tasks/Aot.cs index 80f5a5f8013..3a33369a1ae 100644 --- a/src/Xamarin.Android.Build.Tasks/Tasks/Aot.cs +++ b/src/Xamarin.Android.Build.Tasks/Tasks/Aot.cs @@ -19,6 +19,7 @@ public enum AotMode : uint Hybrid = 0x0002, Full = 0x0003, Interp = 0x0004, + FullInterp = 0x0005, } public enum SequencePointsMode { @@ -181,6 +182,10 @@ IEnumerable<Config> GetAotConfigs (NdkTools ndk) case AotMode.Hybrid: aotOptions.Add ("hybrid"); break; + + case AotMode.FullInterp: + aotOptions.Add ("fullinterp"); + break; } if (!string.IsNullOrEmpty (LdFlags)) { diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/GetAotArguments.cs b/src/Xamarin.Android.Build.Tasks/Tasks/GetAotArguments.cs index 36ffaefa73b..97c92b763b6 100644 --- a/src/Xamarin.Android.Build.Tasks/Tasks/GetAotArguments.cs +++ b/src/Xamarin.Android.Build.Tasks/Tasks/GetAotArguments.cs @@ -98,6 +98,9 @@ public static bool GetAndroidAotMode(string androidAotMode, out AotMode aotMode) case "full": aotMode = AotMode.Full; return true; + case "fullinterp": + aotMode = AotMode.FullInterp; + return true; case "interpreter": // We don't do anything here for this mode, this is just to set the flag for the XA // runtime to initialize Mono in the interpreter "AOT" mode. diff --git a/src/native/runtime-base/android-system.cc b/src/native/runtime-base/android-system.cc index 025362628ae..bf7c40e23ca 100644 --- a/src/native/runtime-base/android-system.cc +++ b/src/native/runtime-base/android-system.cc @@ -589,7 +589,11 @@ AndroidSystem::setup_environment () noexcept break; case 'f': - aotMode = MonoAotMode::MONO_AOT_MODE_FULL; + if (strcmp (mono_aot_mode_name, "fullinterp") == 0) { + aotMode = MonoAotMode::MONO_AOT_MODE_INTERP; + } else { + aotMode = MonoAotMode::MONO_AOT_MODE_FULL; + } break; case 'i':