Friday, 21 June 2019

Observing an increase in Size after migrating to LibC++ in Android

I am working for migrating to LibC++ from Gnustl and I am observing an overall 8-10% Increase in size after migrating to LibC++ from gnustl in Android. Few additional dependencies that we have added that could account for the size is,

• Statically linking additional libunwind.a from libc++ in each so.

• Overriding typeInfo class, especially due to the difference in the behavior of checking typeInfo == operator.

But even after these two changes, I don't understand what has accounted for overall size increase. I initially suspected somehow introduction of LibC++ is disabling the debug symbols stripping but that's also not true, I have verified by explicitly disabling the -Wl,--gc-sections & -ffunction-sections -fdata-sections, which further increases the size of the generated SO and APKs.

Since many of others have already gone through this cycle, I thought it would be good to ask whether or not, others have also observed these side effects of increasing size when using LibC++?

Thanks/



from Observing an increase in Size after migrating to LibC++ in Android

No comments:

Post a Comment