diff options
author | Tej Singh <singhtejinder@google.com> | 2020-04-06 13:26:29 -0700 |
---|---|---|
committer | Tej Singh <singhtejinder@google.com> | 2020-04-06 20:01:49 -0700 |
commit | 1d4b4653cde2e7058f443647b9aa8fceced5160e (patch) | |
tree | 20deeacf5314ff2cf31c85a58b8076d790c93fdc /tools/aapt2/java/JavaClassGenerator.cpp | |
parent | b6eaf6ed79223a4744deba3b391f7dd8ff5617dc (diff) |
Move proto, c++, and test libs to static
Link libgtest_prod, libprotobuf-cpp-lite, and libc++ statically.
This reduces the size of the statsd apex from 2.8M to 1.6M.
Initial:
blueline:/apex/com.android.os.statsd # du -h
16K ./lost+found
764K ./bin
1.3M ./lib64
8.0K ./etc
600K ./lib
120K ./javalib
2.8M .
After linking proto lite and libgtest_prod statically (saves ~500kb):
blueline:/apex/com.android.os.statsd # du -h
16K ./lost+found
800K ./bin
876K ./lib64
8.0K ./etc
600K ./lib
120K ./javalib
2.3M .
After also linking libc++ statically (saves ~700kb):
blueline:/apex/com.android.os.statsd # du -h
16K ./lost+found
0.9M ./bin
296K ./lib64
8.0K ./etc
204K ./lib
120K ./javalib
1.6M .
After this change, the only libraries in both /lib and /lib64 are:
libstats_jni.so
libstatspull.so
libstatssocket.so
These are the 3 libraries we actually want to ship.
Test: m
Test: bit statsd_test:*
Test: atest GtsStatsdHostTestCases
Test: manually inspecting the size of the apex, statsd binary, and
libraries
Bug: 153349706
Bug: 153349659
Bug: 153350187
Change-Id: I00796fc1cf33e394422c6dc617a8430a5f5c5bbb
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator.cpp')
0 files changed, 0 insertions, 0 deletions