Skip to content

Add --strip-inlining-info and --strip-debug-info crossgen2 args for Apple mobile RIDs#53514

Merged
kotlarmilos merged 1 commit intodotnet:mainfrom
kotlarmilos:crossgen-strip-flags-apple-rids
Mar 23, 2026
Merged

Add --strip-inlining-info and --strip-debug-info crossgen2 args for Apple mobile RIDs#53514
kotlarmilos merged 1 commit intodotnet:mainfrom
kotlarmilos:crossgen-strip-flags-apple-rids

Conversation

@kotlarmilos
Copy link
Copy Markdown
Member

@kotlarmilos kotlarmilos commented Mar 18, 2026

Mirror the changes from dotnet/runtime#124604

For Apple mobile RIDs (ios-, tvos-, iossimulator-, tvossimulator-, maccatalyst-), pass --strip-inlining-info and --strip-debug-info to crossgen2 by default via PublishReadyToRunCrossgen2ExtraArgs, controllable via PublishReadyToRunStripInliningInfo and PublishReadyToRunStripDebugInfo MSBuild properties.

…pple mobile RIDs

Mirror the changes from dotnet/runtime#124604 to the SDK's copy of
Microsoft.NET.CrossGen.targets. For Apple mobile RIDs (ios, tvos,
iossimulator, tvossimulator, maccatalyst), pass --strip-inlining-info
and --strip-debug-info to crossgen2 by default via
PublishReadyToRunCrossgen2ExtraArgs, controllable via
PublishReadyToRunStripInliningInfo and PublishReadyToRunStripDebugInfo
MSBuild properties.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 18, 2026 13:00
@kotlarmilos kotlarmilos self-assigned this Mar 18, 2026
@kotlarmilos kotlarmilos added this to the 11.0.1xx milestone Mar 18, 2026
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

Updates the SDK’s Microsoft.NET.CrossGen.targets to match dotnet/runtime#124604 by defaulting crossgen2 to strip extra metadata for Apple mobile runtime identifiers, with opt-out MSBuild properties.

Changes:

  • For Apple mobile RIDs (ios-, tvos-, iossimulator-, tvossimulator-, maccatalyst-), append --strip-inlining-info to PublishReadyToRunCrossgen2ExtraArgs unless PublishReadyToRunStripInliningInfo=false.
  • For the same RIDs, append --strip-debug-info unless PublishReadyToRunStripDebugInfo=false.

You can also share your feedback on Copilot code review. Take the survey.

@kotlarmilos kotlarmilos merged commit f25f310 into dotnet:main Mar 23, 2026
32 checks passed
kotlarmilos added a commit to kotlarmilos/performance that referenced this pull request Mar 30, 2026
…eCLR R2R

Workaround for dotnet/sdk#53514 adding --strip-debug-info and
--strip-inlining-info to crossgen2 args for Apple mobile RIDs before
crossgen2 support (dotnet/runtime#124604) has flowed into the SDK.

This causes CrossGen.targets to fail with:
  System.CommandLine.CommandLineException: No files matching
  --strip-debug-info --instruction-set:apple-m1

Disable both properties until the crossgen2 changes flow in.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
LoopedBard3 pushed a commit to dotnet/performance that referenced this pull request Mar 30, 2026
…eCLR R2R (#5182)

Workaround for dotnet/sdk#53514 adding --strip-debug-info and
--strip-inlining-info to crossgen2 args for Apple mobile RIDs before
crossgen2 support (dotnet/runtime#124604) has flowed into the SDK.

This causes CrossGen.targets to fail with:
  System.CommandLine.CommandLineException: No files matching
  --strip-debug-info --instruction-set:apple-m1

Disable both properties until the crossgen2 changes flow in.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
kotlarmilos added a commit to dotnet/macios that referenced this pull request Apr 17, 2026
… workaround

dotnet/runtime#124604 has flowed to macios via the VMR. The
PublishReadyToRunStripDebugInfo=false / PublishReadyToRunStripInliningInfo=false
workaround is no longer necessary: the SDK now passes --strip-debug-info
and --strip-inlining-info to crossgen2 by default on Apple mobile RIDs
(dotnet/sdk#53514), and crossgen2 accepts those options.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants