Android Java .so Shared Lib sizes, and Android C++ Linker Options to Minimize Size

The Chilkat v9.5.0.79 version reduces the size of the Android Java .so shared libs by approximately 24%. For example, the armv7l lib is reduced from 9.86MB to 7.56MB.

For developers writing C++ code in Android (i.e. using the Android C++ libs downloaded from https://www.chilkatsoft.com/chilkatAndroidCpp.asp), you’ll want to include the following linker options when linking with the Chilkat static libs:

-Wl,--gc-sections,--icf=safe

For the arm64 architecture, omit the “,–icf=safe”

-Wl,--gc-sections
Tags :