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

Commit 22207e65 authored by Jooyung Han's avatar Jooyung Han
Browse files

base: dlopen/dlsym for liblog when SDK_VER <= 29

libbase doesn't have to rely on dlopen/dlsym to use liblog's new symbols
when it is built for __ANDROID_SDK_VERSION__ > 29.

Bug: 150860940
Test: TARGET_BUILD_APPS="com.android.adbd com.android.resolv" m
      objdump -T ...shared_com.android.resolv/libbase.so | grep LIBLOG_R
        => should be none because resolv apex is targeting 29
      objdump -T ...shared_com.android.adbd/libbase.so | grep LIBLOG_R
        => should list all new symbols because adbd apex is targeting R
      objdump -T ...shared/libbase.so | grep LIBLOG_R
        => should list all new symbols

Change-Id: I7f7f16510d7637cd380fe35ea9ff3e804f38851d
parent adc2a7c5
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -70,10 +70,6 @@ cc_defaults {
        "test_utils.cpp",
    ],

    static: {
        cflags: ["-DNO_LIBLOG_DLSYM"],
    },

    cppflags: ["-Wexit-time-destructors"],
    shared_libs: ["liblog"],
    target: {
+1 −3
Original line number Diff line number Diff line
@@ -16,11 +16,9 @@

#include "liblog_symbols.h"

#if defined(__ANDROID__)
#if !defined(NO_LIBLOG_DLSYM) || defined(__ANDROID_APEX__)
#if defined(__ANDROID_SDK_VERSION__) && (__ANDROID_SDK_VERSION__ <= 29)
#define USE_DLSYM
#endif
#endif

#ifdef USE_DLSYM
#include <dlfcn.h>