Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Xamarin.Android.Build.Tasks] add AndroidAotMode=FullInterp #9486

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/Xamarin.Android.Build.Tasks/Tasks/Aot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public enum AotMode : uint
Hybrid = 0x0002,
Full = 0x0003,
Interp = 0x0004,
FullInterp = 0x0005,
}

public enum SequencePointsMode {
Expand Down Expand Up @@ -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)) {
Expand Down
3 changes: 3 additions & 0 deletions src/Xamarin.Android.Build.Tasks/Tasks/GetAotArguments.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 5 additions & 1 deletion src/native/runtime-base/android-system.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down