summaryrefslogtreecommitdiffstats
path: root/core/target_test_internal.mk
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2014-09-18 23:51:52 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-09-18 23:51:53 +0000
commit98f7742a7f5bdc69913ba5e15bba2e60ae5cf724 (patch)
tree1bcbb97ee4913624a050700b1752aba85d6d6d2d /core/target_test_internal.mk
parentef3148c1fa2173a6ed5c4f7a02955acddf88d6ac (diff)
parentb05f2ca150dddf2a2a5ef0ae683181e3b979ef2d (diff)
downloadbuild-98f7742a7f5bdc69913ba5e15bba2e60ae5cf724.zip
build-98f7742a7f5bdc69913ba5e15bba2e60ae5cf724.tar.gz
build-98f7742a7f5bdc69913ba5e15bba2e60ae5cf724.tar.bz2
Merge "Move selection of C++ STL into the build system."
Diffstat (limited to 'core/target_test_internal.mk')
-rw-r--r--core/target_test_internal.mk12
1 files changed, 11 insertions, 1 deletions
diff --git a/core/target_test_internal.mk b/core/target_test_internal.mk
index 95d4159..6b147b1 100644
--- a/core/target_test_internal.mk
+++ b/core/target_test_internal.mk
@@ -5,7 +5,17 @@
LOCAL_CFLAGS += -DGTEST_OS_LINUX_ANDROID -DGTEST_HAS_STD_STRING
LOCAL_C_INCLUDES += external/gtest/include
-ifneq ($(filter libc++,$(LOCAL_SHARED_LIBRARIES)),)
+
+my_test_libcxx := false
+ifndef LOCAL_SDK_VERSION
+ifeq (,$(TARGET_BUILD_APPS))
+ifeq ($(strip $(LOCAL_CXX_STL)),libc++)
+my_test_libcxx := true
+endif
+endif
+endif
+
+ifeq ($(my_test_libcxx),true)
LOCAL_STATIC_LIBRARIES += libgtest_libc++ libgtest_main_libc++
else
LOCAL_STATIC_LIBRARIES += libgtest libgtest_main