Skip to content

[build] Default interpreter only for MonoVM#12208

Open
jonathanpeppers wants to merge 7 commits into
mainfrom
jonathanpeppers-gate-interpreter-default
Open

[build] Default interpreter only for MonoVM#12208
jonathanpeppers wants to merge 7 commits into
mainfrom
jonathanpeppers-gate-interpreter-default

Conversation

@jonathanpeppers

@jonathanpeppers jonathanpeppers commented Jul 22, 2026

Copy link
Copy Markdown
Member

CoreCLR Debug builds currently inherit UseInterpreter=true, but Android does not require the interpreter for hot reload. Default UseInterpreter only when $(_AndroidRuntime) == 'MonoVM'.

Hot reload still requires DOTNET_MODIFIABLE_ASSEMBLIES=Debug for Android Debug builds, including CoreCLR. Generate it whenever $(AndroidIncludeDebugSymbols) is true, independent of UseInterpreter.

  • Useful description of why the change is necessary.
  • Links to issues fixed: N/A
  • Unit tests: Updated environment-file expectations and retained on-device verification of DOTNET_MODIFIABLE_ASSEMBLIES=Debug for CoreCLR Debug.

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
Copilot AI review requested due to automatic review settings July 22, 2026 14:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 UseInterpreter so it only applies when using the Mono runtime (MonoVM).
  • Preserve explicitly provided UseInterpreter / AndroidUseInterpreter values 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
@jonathanpeppers jonathanpeppers added the ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable). label Jul 22, 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants