Use a version script for libaconfig_storage_read_api_cc
Restrict the set of exported symbols to those in the aconfig_storage namespace by way of a version script. This shrinks the shared lib size by ~75%, from ~800KB to <200KB. Bug: 336657207 Test: m Change-Id: I56044fe667a713cf1d94f96c992f379a5725850f
This commit is contained in:
@@ -102,8 +102,6 @@ cc_library {
|
||||
"//apex_available:anyapex",
|
||||
],
|
||||
min_sdk_version: "29",
|
||||
version_script: "libaconfig_storage_read_api_cc.map",
|
||||
double_loadable: true,
|
||||
cflags: [
|
||||
"-fvisibility=hidden",
|
||||
],
|
||||
}
|
||||
|
@@ -0,0 +1,11 @@
|
||||
LIBACONFIG_STORAGE_READ_API_CC {
|
||||
# Export everything in the aconfig_storage namespace. This includes both the
|
||||
# public API and library internals.
|
||||
global:
|
||||
extern "C++" {
|
||||
aconfig_storage::*;
|
||||
};
|
||||
# Hide everything else.
|
||||
local:
|
||||
*;
|
||||
};
|
Reference in New Issue
Block a user