Previously, code defaulted to using libstdc++ (which was GNU libstdc++ on the host, or Bionic's "libstdc++" on the target). Now we default to libc++. The exception for this is when using mingw, because we cannot build libc++ for mingw. Change-Id: I68726fa26cdcb6263f17c838d3e859debd57fae1
29 lines
750 B
Makefile
29 lines
750 B
Makefile
#####################################################
|
|
## Shared definitions for all host test compilations.
|
|
#####################################################
|
|
|
|
ifeq ($(HOST_OS),windows)
|
|
LOCAL_CFLAGS += -DGTEST_OS_WINDOWS
|
|
else
|
|
LOCAL_CFLAGS += -DGTEST_OS_LINUX
|
|
LOCAL_LDLIBS += -lpthread
|
|
endif
|
|
|
|
LOCAL_CFLAGS += -DGTEST_HAS_STD_STRING -O0 -g
|
|
LOCAL_C_INCLUDES += external/gtest/include
|
|
|
|
my_test_libcxx := true
|
|
ifeq (,$(TARGET_BUILD_APPS))
|
|
ifneq ($(filter $(strip $(LOCAL_CXX_STL)),bionic stlport stlport_static),)
|
|
my_test_libcxx := false
|
|
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
|
|
LOCAL_SHARED_LIBRARIES +=
|
|
endif
|
|
|