aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2014-09-27 00:01:54 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-09-27 00:01:55 +0000
commit91adf75c3e0f13bab71e573ec4e3731699f7136e (patch)
tree1d5423e8be5b99a5b28746d7fb81aa4ced02bf6b
parent670018fdaed33a6872925e60fd95c5f401e45444 (diff)
parent683c392e07a555aa1d6eece1eb6d5aef04ab1943 (diff)
downloadbuild-91adf75c3e0f13bab71e573ec4e3731699f7136e.tar.gz
Merge "Fix detection of C++ STL for tests."
-rw-r--r--core/host_test_internal.mk9
-rw-r--r--core/target_test_internal.mk2
2 files changed, 9 insertions, 2 deletions
diff --git a/core/host_test_internal.mk b/core/host_test_internal.mk
index 426c400ad2..5f0a1f3acb 100644
--- a/core/host_test_internal.mk
+++ b/core/host_test_internal.mk
@@ -5,7 +5,14 @@
LOCAL_CFLAGS += -DGTEST_OS_LINUX -DGTEST_HAS_STD_STRING -O0 -g
LOCAL_C_INCLUDES += external/gtest/include
-ifneq ($(filter libc++,$(LOCAL_SHARED_LIBRARIES)),)
+my_test_libcxx := false
+ifeq (,$(TARGET_BUILD_APPS))
+ifneq ($(filter $(strip $(LOCAL_CXX_STL)),libc++ libc++_static),)
+my_test_libcxx := true
+endif
+endif
+
+ifeq ($(my_test_libcxx),true)
LOCAL_STATIC_LIBRARIES += libgtest_libc++_host libgtest_main_libc++_host
else
LOCAL_STATIC_LIBRARIES += libgtest_host libgtest_main_host
diff --git a/core/target_test_internal.mk b/core/target_test_internal.mk
index 65def9c258..50f4036c5a 100644
--- a/core/target_test_internal.mk
+++ b/core/target_test_internal.mk
@@ -9,7 +9,7 @@ LOCAL_C_INCLUDES += external/gtest/include
my_test_libcxx := false
ifndef LOCAL_SDK_VERSION
ifeq (,$(TARGET_BUILD_APPS))
-ifeq ($(strip $(LOCAL_CXX_STL)),libc++)
+ifneq ($(filter $(strip $(LOCAL_CXX_STL)),libc++ libc++_static),)
my_test_libcxx := true
endif
endif