[net11.0] Add CoreCLR and R2R framework to post-processing for symbol stripping#24678
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
💻 [CI Build #52f715b] Tests on macOS arm64 - Mac Sequoia (15) passed 💻✅ All tests on macOS arm64 - Mac Sequoia (15) passed. Pipeline on Agent |
💻 [CI Build #52f715b] Tests on macOS arm64 - Mac Tahoe (26) passed 💻✅ All tests on macOS arm64 - Mac Tahoe (26) passed. Pipeline on Agent |
💻 [CI Build #52f715b] Tests on macOS X64 - Mac Sonoma (14) passed 💻✅ All tests on macOS X64 - Mac Sonoma (14) passed. Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
🔥 [CI Build #7489eba] Test results 🔥Test results❌ Tests failed on VSTS: test results 0 tests crashed, 16 tests failed, 139 tests passed. Failures❌ monotouch tests (iOS)13 tests failed, 0 tests passed.Failed tests
|
This comment has been minimized.
This comment has been minimized.
✅ [CI Build #61aa4b9] Build passed (Build packages) ✅Pipeline on Agent |
✅ [PR Build #61aa4b9] Build passed (Detect API changes) ✅Pipeline on Agent |
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
✅ [CI Build #61aa4b9] Build passed (Build macOS tests) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
🚀 [CI Build #61aa4b9] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 155 tests passed 🎉 Tests counts✅ cecil: All 1 tests passed. Html Report (VSDrops) Download macOS tests✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
Follow-up to #24678. PR #24678 added the CoreCLR runtime frameworks and the R2R composite framework to @(_PostProcessingItem) so they would be stripped, which took effect for Release device builds. In Debug (and simulator) builds the strip was bypassed because the Debug/simulator defaults set the global $(NoSymbolStrip)=true, which then propagates onto every _PostProcessingItem with empty %(NoSymbolStrip) metadata via _CollectItemsForPostProcessing, causing _NativeStripItems to filter all items out. Stamp %(NoSymbolStrip)=false on the CoreCLR runtime and R2R framework items so they are stripped regardless of the global default. Co-authored-by: Copilot <[email protected]>
Follow-up to #24678. PR #24678 added the CoreCLR runtime frameworks and the R2R composite framework to @(_PostProcessingItem) so they would be stripped, which took effect for Release device builds. In CoreCLR Debug (and simulator) builds the strip was bypassed because the Debug-default and simulator-default in Xamarin.Shared.props set the global $(NoSymbolStrip)=true, which then propagates onto every _PostProcessingItem with empty %(NoSymbolStrip) metadata, causing _NativeStripItems to filter all items out. Narrow the Debug and simulator NoSymbolStrip defaults to apply only when UseMonoRuntime=true. CoreCLR (and NativeAOT) don't need native symbol names retained in Debug because the managed debugger uses ICorDebug + DAC over managed metadata, not Mach-O symbol tables. Co-authored-by: Copilot <[email protected]>
Follow-up to #24678. PR #24678 added the CoreCLR runtime frameworks and the R2R composite framework to @(_PostProcessingItem) so they would be stripped, which took effect for Release device builds. In CoreCLR Debug device builds the strip was bypassed because the Debug-default in Xamarin.Shared.props set the global $(NoSymbolStrip)=true, which then propagated onto every _PostProcessingItem with empty %(NoSymbolStrip) metadata, causing _NativeStripItems to filter all items out. Narrow the Debug NoSymbolStrip default to apply only when UseMonoRuntime=true. CoreCLR doesn't need native symbol names retained in Debug because the managed debugger uses ICorDebug + DAC over managed metadata, not Mach-O symbol tables. dSYM bundles are generated for device builds before the strip step runs, so post-mortem symbolication via dSYM is unaffected. The simulator default is intentionally left untouched: simulator builds don't generate dSYMs by default, so keeping symbols in the on-disk binaries preserves on-device symbolication. Co-authored-by: Copilot <[email protected]>
Follow-up to #24678. PR #24678 added the CoreCLR runtime frameworks and the R2R composite framework to @(_PostProcessingItem) so they would be stripped, which took effect for Release device builds. In Debug device builds the strip was bypassed because the Debug-default in Xamarin.Shared.props set the global $(NoSymbolStrip)=true, which then propagated onto every _PostProcessingItem with empty %(NoSymbolStrip) metadata, causing _NativeStripItems to filter all items out. Remove the Debug-default rule entirely. iOS/tvOS device builds now always strip native binaries and a dSYM bundle is generated for post-mortem symbolication, regardless of Configuration. Simulator builds remain unstripped so the live debugger keeps symbols on disk. Co-authored-by: Copilot <[email protected]>
Description
This PR adds CoreCLR and R2R frameworks to _PostProcessingItem for native stripping. There are two sets of items: CoreCLR frameworks and R2R composite framework.
In a MAUI sample app, stripping frameworks reduced the device Release app bundle size from 77.82 MB to 41.62 MB.