Closed barsoosayque closed 4 years ago
Here are some results:
-O2 -flto=full -ffunction-sections -fdata-sections -fvisibility=hidden
cxx/c flags along with --as-needed
link flags were useful.strip
was super useful.All in all, I got the library size cut down to 6.7 MB (-45%). I did everything I knew to reduce size, so if there any other method, reopen this issue / PR it !
As per the current version (0.2.2), the binary size (all ABIs combined) is about 12MB, which is huge. It is 100% possible to reduce that. Three things worth mentioning:
configure
script of FFmpeg. It disables performance optimizations, so it can be potentially harmful.libgdx-oboe.so
with LTO optimizations. I believe, this requires FFmpeg libs to be statically built, but that's not a problem.strip
as a last built step; however, if I'm not mistaken, the NDK toolchain already does that.