summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2020-03-25 20:44:14 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-03-25 20:44:14 +0000
commit5d7d3ab36f93bbb339254b8c8c7b8d3b19a967a3 (patch)
tree2dbbf1c71b98515be06b7b69ef0d7d690ad714a8
parentebf1f162facb8a06348f779975efeb7f8e91bfb5 (diff)
parentb50af6e4d89a10398f7241b22d58ef5c52edf10e (diff)
downloadextras-5d7d3ab36f93bbb339254b8c8c7b8d3b19a967a3.tar.gz
Merge "Use libdexfile_support_static only for the simpleperf NDK binary." into rvc-dev am: b50af6e4d8
Change-Id: Ie8a5f16744b792ed5db3bb34b330b67e595f7fdd
-rw-r--r--simpleperf/Android.bp23
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: {