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

Commit b2abc42c authored by Remi NGUYEN VAN's avatar Remi NGUYEN VAN
Browse files

Build connectivity JNI against libc++_static

Instead of including the whole libc++ library by linking it dynamically,
use the static version so that unused symbols can be stripped.

This allows reducing the APEX size by 1MB (3.7MB -> 2.7MB), as otherwise
libc++ is included twice for 32 and 64 bit variants.

Bug: 171540887
Test: Device boots and has connectivity, size reduced

Change-Id: Ia66d795cf23d6f45997278300c103976433f7c5c
parent d246707c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -141,6 +141,7 @@ cc_library_shared {
        "jni/onload.cpp",
    ],
    shared_libs: ["libandroid"],
    stl: "libc++_static",
    apex_available: [
        "//apex_available:platform",
        "com.android.tethering",
+1 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ cc_library_shared {
        "jni/com_android_server_TestNetworkService.cpp",
        "jni/onload.cpp",
    ],
    stl: "libc++_static",
    shared_libs: [
        "libbase",
        "liblog",