Skip to content

Commit

Permalink
hybris: common: o: improve android pie support
Browse files Browse the repository at this point in the history
  • Loading branch information
krnlyng committed Nov 13, 2019
1 parent 33da544 commit 19829c0
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
5 changes: 5 additions & 0 deletions hybris/common/o/Makefile.am
Expand Up @@ -49,6 +49,11 @@ o_la_CPPFLAGS = \
-DDEFAULT_HYBRIS_LD_LIBRARY_PATH="\"@DEFAULT_HYBRIS_LD_LIBRARY_PATH@\"" \
$(ARCH_FLAGS) \
$(ANDROID_HEADERS_CFLAGS)

if HAS_ANDROID_9_0_0
o_la_CPPFLAGS += -DHAS_ANDROID_9_0_0
endif

o_la_LDFLAGS = \
-lsupc++ \
-module \
Expand Down
16 changes: 16 additions & 0 deletions hybris/common/o/linker.cpp
Expand Up @@ -121,11 +121,17 @@ static const char* const kVendorLibDir = "/vendor/lib";
static const char* const kVendorLibEglDir = "/vendor/lib/egl";
static const char* const kOdmLibDir = "/odm/lib";
static const char* const kOdmLibEglDir = "/odm/lib/egl";
#ifdef HAS_ANDROID_9_0_0
static const char* const kSystemLibVndk28Dir = "/system/lib/vndk-28";
#endif
static const char* const kAsanSystemLibDir = "/data/asan/system/lib";
static const char* const kAsanVendorLibDir = "/data/asan/vendor/lib";
static const char* const kAsanVendorLibEglDir = "/data/asan/vendor/lib/egl";
static const char* const kAsanOdmLibDir = "/data/asan/odm/lib";
static const char* const kAsanOdmLibEglDir = "/data/asan/odm/lib/egl";
#ifdef HAS_ANDROID_9_0_0
static const char* const kAsanSystemLibVndk28Dir = "/data/asan/system/lib/vndk-28";
#endif
#endif

static const char* const kAsanLibDirPrefix = "/data/asan";
Expand All @@ -135,8 +141,13 @@ static const char* const kDefaultLdPaths[] = {
kOdmLibDir,
kVendorLibDir,

// libhybris support:
kOdmLibEglDir,
kVendorLibEglDir,

#ifdef HAS_ANDROID_9_0_0
kSystemLibVndk28Dir,
#endif
nullptr
};

Expand All @@ -153,6 +164,11 @@ static const char* const kAsanDefaultLdPaths[] = {
kOdmLibEglDir,
kAsanVendorLibEglDir,
kVendorLibEglDir,

#ifdef HAS_ANDROID_9_0_0
kAsanSystemLibVndk28Dir,
kSystemLibVndk28Dir,
#endif
nullptr
};

Expand Down
1 change: 1 addition & 0 deletions hybris/configure.ac
Expand Up @@ -228,6 +228,7 @@ AC_SUBST(ANDROID_VERSION_PATCH, [$android_headers_patch])
AC_MSG_NOTICE("Android headers version is $android_headers_major.$android_headers_minor.$android_headers_patch")

# Add automake tests for version/API needs here that you need in code, including test .am's
AM_CONDITIONAL([HAS_ANDROID_9_0_0], [test $android_headers_major -ge 9 -a $android_headers_minor -ge 0 ])
AM_CONDITIONAL([HAS_ANDROID_8_0_0], [test $android_headers_major -ge 8 -a $android_headers_minor -ge 0 ])
AM_CONDITIONAL([HAS_ANDROID_7_0_0], [test $android_headers_major -ge 7 -a $android_headers_minor -ge 0 ])
AM_CONDITIONAL([HAS_ANDROID_6_0_0], [test $android_headers_major -ge 6 -a $android_headers_minor -ge 0 ])
Expand Down

1 comment on commit 19829c0

@JamiKettunen
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works nice for me using SailfishOS based on hybris-16.0 👍 no more need for my hacky symlink to get audio sailfishos-oneplus5/droid-config-cheeseburger@c371cf1
Any chance for this to get a PR & be merged into libhybris soon?

Please sign in to comment.