Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1b0d669d authored by John Reck's avatar John Reck
Browse files

Shrink surfaceflinger

Before we make it huge with skia, first make it a lot smaller

* Remove unnecessary libsurfaceflinger dependency in unit tests
Since the unit tests include the entire source of the shared
library anyway, depending on them as a prebuilt is redundant.
And also undefined behavior (ODR violation).

* Remove libsurfaceflinger entirely
Build a fat surfacefligner binary instead. This avoids building
both a 32-bit & 64-bit shared library pointlessly, cutting size
in half alone. It also reduces exported symbols.

* Remove obsolete ld export-dynamic option
This was added for sigchain workarounds, but since then the
usage of sigchain itself was removed. This option is therefore
obsolete, shaving even more binary size.

Before:
$ find $OUT/system -name '*surfaceflinger*' | xargs ls -sh
 16K system/bin/surfaceflinger
4.0K system/etc/init/surfaceflinger.rc
2.2M system/lib64/libsurfaceflinger.so
1.5M system/lib/libsurfaceflinger.so

After:
$ find $OUT/system -name '*surfaceflinger*' | xargs ls -sh
1.8M system/bin/surfaceflinger
4.0K system/etc/init/surfaceflinger.rc

Net savings of around 2M

Test: builds, boots, atest libsurfaceflinger_unittest
Change-Id: Ibd43e25aa67027edc0ccc5b5e50edb5b5f2169ca
parent 1b66d525
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment