Add missing library dependency.
Libcore tests reference standard libcore headers, including objects
that use libnativehelper code. Thus the tests also require
libnativehelper.
This breaks ASan build. Does not reproduce in the normal build because
all libnativehelper references are in dead code, and ASan disables
dead code stripping:
https://code.google.com/p/address-sanitizer/issues/detail?id=260
Bug: 21785137
Change-Id: Ic272384cc1a6f77e81079bf4f4ea751a0ed92ea1
diff --git a/NativeCode.mk b/NativeCode.mk
index 79d6a60..379a1cb 100644
--- a/NativeCode.mk
+++ b/NativeCode.mk
@@ -117,6 +117,7 @@
LOCAL_MODULE_TAGS := debug
LOCAL_MODULE := libjavacore-unit-tests
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/NativeCode.mk
+LOCAL_SHARED_LIBRARIES := libnativehelper
LOCAL_CXX_STL := libc++
include $(BUILD_NATIVE_TEST)
@@ -131,6 +132,7 @@
LOCAL_MODULE_TAGS := debug
LOCAL_MODULE := libjavacore-benchmarks
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/NativeCode.mk
+LOCAL_SHARED_LIBRARIES := libnativehelper
LOCAL_CXX_STL := libc++
LOCAL_MULTILIB := both
LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)32