From 1ca3b70f84311884dfe00398fb28526d247c62f3 Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Thu, 13 Aug 2015 17:41:56 -0700 Subject: [PATCH] Blacklist libc++ from windows host builds It's not ready, and instead of each Android.mk doing this, do it in the core build. Change-Id: Ie80b17ffcde64e72c98d310ca986d4cf775c099e --- core/cxx_stl_setup.mk | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/core/cxx_stl_setup.mk b/core/cxx_stl_setup.mk index f150714cec..cda45a0ec1 100644 --- a/core/cxx_stl_setup.mk +++ b/core/cxx_stl_setup.mk @@ -14,7 +14,7 @@ ifeq ($(strip $(LOCAL_CXX_STL)),default) my_cxx_stl := libc++_static endif - ifdef USE_MINGW + ifeq ($($(my_prefix)OS),windows) # libc++ is not supported on mingw. my_cxx_stl := libstdc++ endif @@ -36,6 +36,14 @@ else # the two options use different names for the STLs. $(error $(LOCAL_PATH): $(LOCAL_MODULE): Must use LOCAL_NDK_STL_VARIANT rather than LOCAL_CXX_STL for NDK binaries) endif + ifdef LOCAL_IS_HOST_MODULE + ifeq ($($(my_prefix)OS),windows) + ifneq ($(filter $(my_cxx_stl),libc++ libc++_static),) + # libc++ is not supported on mingw. + my_cxx_stl := libstdc++ + endif + endif + endif endif # Yes, this is actually what the clang driver does.