Skip to content

[clr-ios] Add options to strip inlining and debug info in Crossgen2 on Apple mobile#124604

Open
kotlarmilos wants to merge 1 commit intodotnet:mainfrom
kotlarmilos:improvement/crossgen2-composite-strip-header
Open

[clr-ios] Add options to strip inlining and debug info in Crossgen2 on Apple mobile#124604
kotlarmilos wants to merge 1 commit intodotnet:mainfrom
kotlarmilos:improvement/crossgen2-composite-strip-header

Conversation

@kotlarmilos
Copy link
Member

@kotlarmilos kotlarmilos commented Feb 19, 2026

Description

This PR adds --strip-inlining-info and --strip-debug-info options to crossgen2 and auto-enables them for Apple mobile platforms. Stripping these sections reduces the composite R2R dylib size by 2.2 MB in MAUI template app.

Copilot AI review requested due to automatic review settings February 19, 2026 16:36
@kotlarmilos kotlarmilos self-assigned this Feb 19, 2026
@kotlarmilos kotlarmilos requested review from elinor-fung, janvorli and jkoritzinsky and removed request for Copilot February 19, 2026 16:36
@kotlarmilos kotlarmilos added the os-ios Apple iOS label Feb 19, 2026
@kotlarmilos kotlarmilos added this to the 11.0.0 milestone Feb 19, 2026
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to 'os-ios': @vitek-karas, @kotlarmilos, @steveisok, @akoeplinger
See info in area-owners.md if you want to be subscribed.

<data name="StripInliningInfoOption" xml:space="preserve">
<value>Strip inlining info from the R2R image.</value>
</data>
<data name="StripDebugInfoOption" xml:space="preserve">
Copy link
Member

Choose a reason for hiding this comment

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

Is this managed or native debug info? i.e. does this affect native stack traces / crash reports in any way?

Copy link
Member

Choose a reason for hiding this comment

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

It is managed debug info. It does not affect what you see in the native debugger.

@jkotas
Copy link
Member

jkotas commented Feb 20, 2026

These platforms don't support JIT, so inlining and debug info sections in the R2R image are not used at runtime.

Nit: This is not accurate statement. These sections are usable without JIT as well:

  • Debug info can be used at runtime to produce line numbers in stacktraces (e.g. Exception.ToString)
  • Inlining info can be used to modify code at runtime using profiler interfaces. This feature is under FEATURE_REJIT and it is currently disabled for platforms without JIT, but there is nothing fundamental preventing it from working with interpreter.

It is fine to lose these features for mobile apps. I am just pointing out that it is not really related to JIT support.

@kotlarmilos
Copy link
Member Author

Thanks Jan, updated the description.

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

Comments