Build System: Fix rpath error if native executable under testcase folder.
error while loading shared libraries: libc++.so:
cannot open shared object file: No such file or directory
BUG: N/A
Test: make -j16 liblatinime_host_unittests
out/host/linux-x86/testcases/liblatinime_host_unittests/x86_64/liblatinime_host_unittests
Change-Id: I97738f728c29ab904fc979ff9b08a8d5bd1328cd
diff --git a/core/host_executable_internal.mk b/core/host_executable_internal.mk
index c4f9f66..e72c419 100644
--- a/core/host_executable_internal.mk
+++ b/core/host_executable_internal.mk
@@ -33,7 +33,7 @@
my_libdir := $(notdir $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)OUT_SHARED_LIBRARIES))
ifeq ($(LOCAL_MODULE_CLASS),NATIVE_TESTS)
-$(LOCAL_BUILT_MODULE): PRIVATE_RPATHS := ../../$(my_libdir)
+$(LOCAL_BUILT_MODULE): PRIVATE_RPATHS := ../../$(my_libdir) ../../../$(my_libdir)
else
$(LOCAL_BUILT_MODULE): PRIVATE_RPATHS := ../$(my_libdir) $(my_libdir)
endif