You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As reported in: dotnet/runtime#88032 NativeAOT can produce object files which cause the native linker to seg fault during linking when -dead_strip is enabled.
As a workaround, do not include -dead_strip as an optimisation switch to the native linker in case of NativeAOT runtime, so we ship a more stable product in .NET8 preview 7 release
The text was updated successfully, but these errors were encountered:
#18553)
This PR disables passing `-dead_strip` to the native linker in case of
NativeAOT runtime to prevent build failures.
Additionally, this change affects the size of the application in the
following way - measured with `dotnet new maui` app version
`8.0.0-preview.7.23359.1`:
| MAUI iOS | -dead_strip | no -dead_strip | diff (b) | diff (Kb) | diff
(%) |
|----------|--------------|----------|----------|-----------|----------|
| .ipa (b) | 13377583 | 13435276 | 57693 | 57,693 | 0,43% |
| Size on disk (b) | 41883897 | 42038873 | 154976 | 154,976 | 0,37% |
| binary (b) | 39614336 | 39769312 | 154976 | 154,976 | 0,39% |
Even though the size of the application regresses, with this change we
have a more stable product.
Finally, once this PR gets merged we can open a tracking issue to solve
the size regression either by fixing:
- dotnet/runtime#88032 or
- by manually removing the dead code as proposed by @filipnavara here:
dotnet/runtime#88032 (comment)
---
Fixes: #18552
Description
As reported in: dotnet/runtime#88032 NativeAOT can produce object files which cause the native linker to seg fault during linking when
-dead_strip
is enabled.This issue is reproducible with
.NET8 preview 6
release: https://github.com/xamarin/xamarin-macios/tree/release/8.0.1xx-preview6 when buildingMAUI Podcast app
with NativeAOT, resulting with build failures.Proposal
As a workaround, do not include
-dead_strip
as an optimisation switch to the native linker in case of NativeAOT runtime, so we ship a more stable product in.NET8 preview 7
releaseThe text was updated successfully, but these errors were encountered: