aboutsummaryrefslogtreecommitdiff
path: root/core/target_test_internal.mk
diff options
context:
space:
mode:
Diffstat (limited to 'core/target_test_internal.mk')
-rw-r--r--core/target_test_internal.mk4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/target_test_internal.mk b/core/target_test_internal.mk
index 7b99678f9b..49ea518cfe 100644
--- a/core/target_test_internal.mk
+++ b/core/target_test_internal.mk
@@ -5,6 +5,9 @@
LOCAL_CFLAGS += -DGTEST_OS_LINUX_ANDROID -DGTEST_HAS_STD_STRING
LOCAL_C_INCLUDES += external/gtest/include
+ifneq ($(filter libc++,$(LOCAL_SHARED_LIBRARIES)),)
+LOCAL_STATIC_LIBRARIES += libgtest_libc++ libgtest_main_libc++
+else
LOCAL_STATIC_LIBRARIES += libgtest libgtest_main
ifndef LOCAL_SDK_VERSION
@@ -14,6 +17,7 @@ LOCAL_C_INCLUDES += bionic \
LOCAL_SHARED_LIBRARIES += libstlport
LOCAL_STATIC_LIBRARIES += libstdc++
endif
+endif
ifndef LOCAL_MODULE_PATH
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_NATIVE_TESTS)/$(LOCAL_MODULE)