Skip to content

Default legacy compatibility assembly fixups off - #12925

Open
jonathanpeppers wants to merge 1 commit into
mainfrom
jonathanpeppers-retire-legacy-assembly-fixups
Open

jonathanpeppers wants to merge 1 commit into
mainfrom
jonathanpeppers-retire-legacy-assembly-fixups

Conversation

@jonathanpeppers

Copy link
Copy Markdown
Member

Summary

  • Default AndroidEnableLegacyCompatibilityAssemblyFixups to false for LLVM-IR builds; retain the existing false default for trimmable type maps.
  • Honor the opt-in in existing untrimmed and trimmed LLVM-IR fixup passes, without enabling new fixup paths for trimmed trimmable/CoreCLR or NativeAOT builds. Keep unrelated post-trimming behavior and XA2000 reporting unchanged.
  • Cover default-off and opted-in behavior in build and device tests.

Validation

  • Checked changed MSBuild targets as XML and ran git diff --check.
  • Local build and test execution are blocked because this worktree lacks bin/BuildDebug/net10.0/xa-prep-tasks.dll, the local SDK, and restored test assets (MSB4062 / NETSDK1004).

Public documentation was left untouched as requested.

Gate existing trimmed LLVM-IR compatibility steps on the opt-in property while preserving unrelated post-trim diagnostics. Cover default and opt-in behavior in build tests.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings September 25, 2026 20:35

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.

Copilot review overview

🟡 Changes recommended

Trimmed LLVM-IR and default-off device behavior lack coverage, and public documentation still states the old default.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Low severity

Open (1)
What changed in this PR

Changes LLVM-IR legacy compatibility assembly fixups to be disabled by default while preserving explicit opt-in behavior.

Changes:

  • Gates untrimmed and post-trimming fixup passes behind the opt-in property.
  • Preserves trimmable type-map behavior.
  • Updates unit, build, and device test scenarios.
File Summary
tests/​MSBuildDeviceIntegration/​Tests/​InstallAndRunTests.cs Enables opt-in fixups; needs a paired default-off test.
src/​Xamarin.Android.Build.Tasks/​Tests/​Xamarin.Android.Build.Tests/​Tasks/​LinkerTests.cs Tests fixup defaults and opt-in behavior.
src/​Xamarin.Android.Build.Tasks/​Tasks/​PostTrimmingPipeline.cs Propagates post-trimming fixup gating; trimmed behavior needs coverage.
src/​Xamarin.Android.Build.Tasks/​Tasks/​LinkAssembliesNoShrink.cs Defaults fixups to disabled.
src/​Xamarin.Android.Build.Tasks/​Microsoft.Android.Sdk/​targets/​Microsoft.Android.Sdk.TypeMap.LlvmIr.targets Changes the LLVM-IR default and wiring; documentation and trimmed coverage need updates.
src/​Xamarin.Android.Build.Tasks/​Linker/​MonoDroid.Tuner/​PostTrimmingFixAbstractMethodsStep.cs Conditionally applies abstract-method fixups; both flag states need test coverage.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants