diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2020-03-25 20:29:25 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-03-25 20:29:25 +0000 |
commit | b50af6e4d89a10398f7241b22d58ef5c52edf10e (patch) | |
tree | 2dbbf1c71b98515be06b7b69ef0d7d690ad714a8 | |
parent | 63854bfa25cfdb538f7fdb1deeb3853e4ce3f5cc (diff) | |
parent | 5f3abbbbbbd2edd39f507c7b1ec5c1df912f1814 (diff) | |
download | extras-b50af6e4d89a10398f7241b22d58ef5c52edf10e.tar.gz |
Merge "Use libdexfile_support_static only for the simpleperf NDK binary." into rvc-dev
-rw-r--r-- | simpleperf/Android.bp | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/simpleperf/Android.bp b/simpleperf/Android.bp index 089a71ad..f1f2d6bc 100644 --- a/simpleperf/Android.bp +++ b/simpleperf/Android.bp @@ -166,7 +166,6 @@ cc_defaults { linux: { static_libs: [ "libunwindstack", - "libdexfile_support_static", "libcutils", "libprocinfo", "libevent", @@ -327,6 +326,13 @@ cc_library_static { "libbuildversion", ], use_version_lib: false, + + target: { + linux: { + // See note for libdexfile_support_static in simpleperf_ndk. + static_libs: ["libdexfile_support"], + }, + }, } // simpleperf shipped in system image @@ -406,6 +412,14 @@ cc_binary { dir: "simpleperf/darwin/x86_64", }, }, + linux: { + // In the NDK we need libdexfile_support_static which links + // libdexfile_external and its ART dependencies statically. However + // in other libraries we must use libdexfile_support, which dlopen's + // libdexfile_external.so from the ART APEX, to avoid getting ART + // internals in the system image. + static_libs: ["libdexfile_support_static"], + }, linux_glibc_x86: { dist: { dir: "simpleperf/linux/x86", @@ -450,6 +464,10 @@ cc_library { windows: { enabled: false, }, + linux: { + // See note for libdexfile_support_static in simpleperf_ndk. + static_libs: ["libdexfile_support"], + }, }, } @@ -473,6 +491,9 @@ cc_library_shared { }, linux: { ldflags: ["-Wl,--exclude-libs,ALL"], + // See note for libdexfile_support_static in simpleperf_ndk. This is + // part of the NDK, so use libdexfile_support_static. + static_libs: ["libdexfile_support_static"], }, darwin: { dist: { |