diff options
| author | Martin Stjernholm <mast@google.com> | 2018-10-24 15:02:55 +0100 |
|---|---|---|
| committer | Martin Stjernholm <mast@google.com> | 2018-10-29 21:20:43 +0000 |
| commit | 8a94003e66f337fe84870ff68d3f6f234555cf06 (patch) | |
| tree | 0271729b2571c969238786d21a45ce05120b96e0 /libartbase | |
| parent | ce2a00daa92670a4fc01ef59fdbc3769a846f69c (diff) | |
| download | art-8a94003e66f337fe84870ff68d3f6f234555cf06.tar.gz art-8a94003e66f337fe84870ff68d3f6f234555cf06.tar.bz2 art-8a94003e66f337fe84870ff68d3f6f234555cf06.zip | |
Link compression libs statically into libartbase and use those everywhere.
All targets using these compression libs already use libartbase. This grows
libartbase VM size by 314K on 64 bit, but only these targets pack on the
extra the bloat of liblz4 (84K) and liblzma (174K): dexanalyze, dexdump2,
dexlayout(d), dexlist. libbacktrace and libunwindstack gain liblz4 only.
On the other hand this gets rid of static instances in several shared libs.
Test: mmma art
Test: art/test.py --host --64 --optimizing
Test: env ART_TEST_NO_SYNC=true make -j4 test-art-target-gtest
Test: art/test/testrunner/testrunner.py -j4 --target --64 --optimizing
Bug: 118374951
Change-Id: Ida103546d2d16ef892d09e9ca3a0ae5e3b42a541
Diffstat (limited to 'libartbase')
| -rw-r--r-- | libartbase/Android.bp | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/libartbase/Android.bp b/libartbase/Android.bp index 0c6b1a2ef6..44b75e6ae6 100644 --- a/libartbase/Android.bp +++ b/libartbase/Android.bp @@ -49,20 +49,15 @@ cc_defaults { ], target: { android: { - static_libs: [ - // ZipArchive support, the order matters here to get all symbols. - "libziparchive", - "libz", - ], shared_libs: [ // For android::FileMap used by libziparchive. "libutils", ], }, host: { - shared_libs: [ - "libziparchive", - "libz", + static_libs: [ + // For android::FileMap used by libziparchive. + "libutils", ], }, }, @@ -75,6 +70,18 @@ cc_defaults { // For common macros. "libbase", ], + + // Utilities used by various ART libs and tools are linked in statically + // here to avoid shared lib dependencies outside the ART APEX. No target + // there should depend on these separately. + whole_static_libs: [ + "liblz4", + "liblzma", + // ZipArchive support, the order matters here to get all symbols. + "libziparchive", + "libz", + ], + export_include_dirs: ["."], // ART's macros.h depends on libbase's macros.h. // Note: runtime_options.h depends on cmdline. But we don't really want to export this @@ -89,8 +96,6 @@ cc_defaults { "libcutils", "liblog", "libutils", - "libz", - "libziparchive", ], } @@ -129,7 +134,6 @@ art_cc_library { }, shared_libs: [ "libbase", - "libziparchive", ], export_shared_lib_headers: ["libbase"], } @@ -140,11 +144,6 @@ art_cc_library { "art_debug_defaults", "libartbase_defaults", ], - shared_libs: [ - "libbase", - "libziparchive", - ], - export_shared_lib_headers: ["libbase"], } art_cc_library { |
