diff options
author | 2020-09-23 01:40:03 +0100 | |
---|---|---|
committer | 2020-09-28 10:13:56 +0000 | |
commit | a28438ab47e8e41599fa6b2343f8a6a21efa0116 (patch) | |
tree | 519080d02e7f1b3ce07d82efd579ea3bfae59b8a | |
parent | 2f47a3110a16d60128a16b280191941df4ecf237 (diff) |
Disable the -d vs non-d libartbase dlopen check when it's static.
Test: m hiddenapi && out/host/linux-x86/bin/hiddenapi
when it is built with static libartbase (see child CL).
Bug: 145934348
Change-Id: I2487e3e2b2b7153e71590748f5e2b6dbd4b5e4f6
-rw-r--r-- | libartbase/Android.bp | 3 | ||||
-rw-r--r-- | libartbase/base/globals_unix.cc | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/libartbase/Android.bp b/libartbase/Android.bp index af8e3423d4..5845266e44 100644 --- a/libartbase/Android.bp +++ b/libartbase/Android.bp @@ -79,6 +79,9 @@ cc_defaults { "base/globals_unix.cc", "base/mem_map_unix.cc", ], + static: { + cflags: ["-DART_STATIC_LIBARTBASE"], + }, shared_libs: [ "libziparchive", "libz", diff --git a/libartbase/base/globals_unix.cc b/libartbase/base/globals_unix.cc index 0d2e8a9104..9a67dc49dd 100644 --- a/libartbase/base/globals_unix.cc +++ b/libartbase/base/globals_unix.cc @@ -22,6 +22,8 @@ namespace art { +#ifndef ART_STATIC_LIBARTBASE + #ifdef __APPLE__ // dlopen(3) on Linux with just an SO name will search the already // opened libraries. On Darwin, we need dlopen(3) needs the SO name @@ -72,4 +74,6 @@ static struct CheckLoadedBuild { } } g_check_loaded_build; +#endif // !ART_STATIC_LIBARTBASE + } // namespace art |