summaryrefslogtreecommitdiff
path: root/libnativeloader
diff options
context:
space:
mode:
authorDavid Srbecky <dsrbecky@google.com>2020-07-01 15:10:23 +0100
committerDavid Srbecky <dsrbecky@google.com>2020-07-02 00:06:55 +0000
commitc4b50b3bb8125aa12255587c55b356b424278110 (patch)
tree01821ce1b27fa58b5b3b058b8ccfcbc9662b2112 /libnativeloader
parentbeed922d8e517470720486ab7cafb126b5ff963d (diff)
Improve library search paths for host gtests.
Ensure the host gtests can also find the needed data and libraries when executed remotely from testcases directory. Bug: 147817558 Test: Tested that tests pass with further followup CLs. Change-Id: I3562b1e89044dbc125afe4c83a4817cb0e73e716
Diffstat (limited to 'libnativeloader')
-rw-r--r--libnativeloader/Android.bp13
1 files changed, 13 insertions, 0 deletions
diff --git a/libnativeloader/Android.bp b/libnativeloader/Android.bp
index 5f29b4d626..33a2c8f483 100644
--- a/libnativeloader/Android.bp
+++ b/libnativeloader/Android.bp
@@ -35,6 +35,19 @@ art_cc_library {
"libbase",
],
target: {
+ // Library search path needed for running host tests remotely (from testcases directory).
+ linux_glibc_x86: {
+ ldflags: [
+ "-Wl,-rpath,$ORIGIN/../art_common/out/host/linux-x86/lib",
+ "-Wl,--enable-new-dtags",
+ ],
+ },
+ linux_glibc_x86_64: {
+ ldflags: [
+ "-Wl,-rpath,$ORIGIN/../art_common/out/host/linux-x86/lib64",
+ "-Wl,--enable-new-dtags",
+ ],
+ },
android: {
srcs: [
"library_namespaces.cpp",