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

Commit 8782e1e8 authored by Jared Duke's avatar Jared Duke
Browse files

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
parent c6e4a86b
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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",
    ],
}
+11 −0
Original line number Diff line number Diff line
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:
    *;
};