Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not include -dead_strip when native linking a NativeAOT object file (
#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
- Loading branch information
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.