[build] Default interpreter only for MonoVM#12208
Open
jonathanpeppers wants to merge 7 commits into
Open
Conversation
CoreCLR Debug builds currently inherit UseInterpreter=true even though the interpreter is a MonoVM feature. Gate the Debug default on UseMonoRuntime while preserving explicit property values. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 599ee730-f9a4-4c0b-9d97-1c51427a6711
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts the .NET for Android MSBuild defaulting logic so that the Debug-time implicit interpreter setting is only applied for MonoVM builds, preventing CoreCLR Debug builds from inheriting a MonoVM-specific feature by default.
Changes:
- Gate the Debug default for
UseInterpreterso it only applies when using the Mono runtime (MonoVM). - Preserve explicitly provided
UseInterpreter/AndroidUseInterpretervalues by only defaulting when both are unset.
Use the already-computed _AndroidRuntime property when deciding whether to default UseInterpreter. This avoids enabling the interpreter for NativeAOT when both PublishAot and UseMonoRuntime are true. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 599ee730-f9a4-4c0b-9d97-1c51427a6711
rolfbjarne
approved these changes
Jul 23, 2026
CoreCLR no longer defaults UseInterpreter to true in Debug builds, so DOTNET_MODIFIABLE_ASSEMBLIES should not be set. Update the device integration test to assert the new expected behavior. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 599ee730-f9a4-4c0b-9d97-1c51427a6711
Keep FastDeployEnvironmentFiles focused on verifying that DOTNET_MODIFIABLE_ASSEMBLIES reaches the running app. Explicitly opt CoreCLR Debug builds into UseInterpreter now that it is no longer the default. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 599ee730-f9a4-4c0b-9d97-1c51427a6711
Android hot reload requires DOTNET_MODIFIABLE_ASSEMBLIES=Debug even when the CoreCLR runtime does not use the interpreter. Generate the variable whenever the debug libmonodroid.so is selected, update the host expectation, and retain the device test's existing behavior. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 599ee730-f9a4-4c0b-9d97-1c51427a6711
Update the environment-variable test comment to identify AndroidIncludeDebugSymbols as the direct condition. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 599ee730-f9a4-4c0b-9d97-1c51427a6711
DOTNET_MODIFIABLE_ASSEMBLIES now follows AndroidIncludeDebugSymbols, so the environment-file test no longer needs to vary UseInterpreter. Remove that parameter and the NativeAOT skip tied to the old expectation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 599ee730-f9a4-4c0b-9d97-1c51427a6711
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CoreCLR Debug builds currently inherit
UseInterpreter=true, but Android does not require the interpreter for hot reload. DefaultUseInterpreteronly when$(_AndroidRuntime) == 'MonoVM'.Hot reload still requires
DOTNET_MODIFIABLE_ASSEMBLIES=Debugfor Android Debug builds, including CoreCLR. Generate it whenever$(AndroidIncludeDebugSymbols)is true, independent ofUseInterpreter.DOTNET_MODIFIABLE_ASSEMBLIES=Debugfor CoreCLR Debug.