-
Notifications
You must be signed in to change notification settings - Fork 516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NativeAOT: re-enable dead stripping #18605
Comments
Once dotnet/runtime@d9a6607 flows in, we should try enable |
Is xamarin-macios still using ld_classic? then I assume it'd still be affected by dotnet/runtime#88032 |
Yes dotnet/runtime#88032 reported an issue that occasionally The idea is to try turning |
…ault (#20796) ### Description NativeAOT now properly marks all symbols as non-deadstrippable in the object file it generates: dotnet/runtime@d9a6607 And uses `-dead_strip` as the default build option. In this PR we are doing the same - reenabling the `-dead_strip` as the default platform linker switch. This reverts previous workaround introduced in: f212f6b ### Size savings | MySingleView | Main | This PR | diff (%) | |--------------|------|---------|----------| | SOD (MB) | 2,87 | 2,70 | -5,99% | |,ipa (MB) | 1,22 | 1,17 | -4,61% | Even though this brings `4-5%` size reduction for a MySingleView app, the size savings are not proportional to the app size, as the savings are coming from stripping native libraries only. Based on measurements reported in dotnet/runtime@d9a6607 the actual expected savings for a MAUI app are around `~1.5%`. --- Fixes #18605 and dotnet/runtime#88032 --------- Co-authored-by: Ivan Povazan <ivan.povazan@gmail.com>
Fixed in #20796. |
We've disabled passing -dead_strip to ld for NativeAOT:
-dead_strip
to the native linker #18552It should be re-enabled once this is fixed:
The text was updated successfully, but these errors were encountered: