Skip to content

[clr-ios] Update MtouchLink conditions for Debug configuration#34107

Merged
PureWeen merged 6 commits intonet11.0from
improvement/coreclr-default-trimming
Mar 24, 2026
Merged

[clr-ios] Update MtouchLink conditions for Debug configuration#34107
PureWeen merged 6 commits intonet11.0from
improvement/coreclr-default-trimming

Conversation

@kotlarmilos
Copy link
Copy Markdown
Member

Description

This PR updates the default TrimMode to SdkOnly for CoreCLR Debug builds.

MAUI template - Before
Build Time: 75.476618000s
Bundle Size: 224.64 MB

MAUI template - After
Build: 45.338192000s
Size: 78.42MB

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 optimizes iOS Debug build configuration by enabling SDK-only linking for CoreCLR runtime builds. The change distinguishes between Mono runtime (which uses the interpreter in Debug mode and should have no linking) and CoreCLR runtime (which can benefit from SDK-only linking even in Debug). According to the PR description, this improves build time from ~75s to ~45s and reduces bundle size from ~225MB to ~78MB for MAUI template apps.

Changes:

  • Updates iOS targets file to conditionally set MtouchLink based on runtime type (Mono vs CoreCLR)
  • Adds UseMonoRuntime check to existing Debug+Interpreter condition to make it Mono-specific
  • Introduces new condition to enable SdkOnly linking for CoreCLR Debug builds

rolfbjarne
rolfbjarne previously approved these changes Feb 18, 2026
@PureWeen
Copy link
Copy Markdown
Member

/azp run maui-pr-uitests, maui-pr-devicetests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 27, 2026

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 34107

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 34107"

@kotlarmilos kotlarmilos enabled auto-merge March 5, 2026 10:12
@PureWeen PureWeen removed this from the .NET 11.0-preview2 milestone Mar 12, 2026
@PureWeen PureWeen added this to the .NET 11.0-preview3 milestone Mar 12, 2026
@PureWeen
Copy link
Copy Markdown
Member

/azp run maui-pr-uitests, maui-pr-devicetests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

@rolfbjarne rolfbjarne self-assigned this Mar 18, 2026
@rolfbjarne
Copy link
Copy Markdown
Member

/azp run maui-pr-uitests, maui-pr-devicetests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

@kotlarmilos
Copy link
Copy Markdown
Member Author

The failures shouldn't be related

@kotlarmilos
Copy link
Copy Markdown
Member Author

kotlarmilos commented Mar 24, 2026

CI failures are unrelated to the CoreCLR trimming change

@PureWeen PureWeen disabled auto-merge March 24, 2026 20:26
@PureWeen PureWeen merged commit f371734 into net11.0 Mar 24, 2026
197 of 209 checks passed
@PureWeen PureWeen deleted the improvement/coreclr-default-trimming branch March 24, 2026 20:26
@github-project-automation github-project-automation bot moved this from Approved to Done in MAUI SDK Ongoing Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants