Add --strip-inlining-info and --strip-debug-info crossgen2 args for Apple mobile RIDs#53514
Merged
kotlarmilos merged 1 commit intodotnet:mainfrom Mar 23, 2026
Merged
Conversation
…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>
Contributor
There was a problem hiding this comment.
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-infotoPublishReadyToRunCrossgen2ExtraArgsunlessPublishReadyToRunStripInliningInfo=false. - For the same RIDs, append
--strip-debug-infounlessPublishReadyToRunStripDebugInfo=false.
You can also share your feedback on Copilot code review. Take the survey.
rolfbjarne
approved these changes
Mar 23, 2026
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>
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.
Mirror the changes from dotnet/runtime#124604
For Apple mobile RIDs (
ios-,tvos-,iossimulator-,tvossimulator-,maccatalyst-), pass--strip-inlining-infoand--strip-debug-infoto crossgen2 by default viaPublishReadyToRunCrossgen2ExtraArgs, controllable viaPublishReadyToRunStripInliningInfoandPublishReadyToRunStripDebugInfoMSBuild properties.