Properly set LOCAL_CXX_STL where needed
This sets _USING_LIBCXX correctly, causing <stdatomic.h> to correctly detect
that <atomic> is available, preventing compilation failures when both are
included.
Removed prior manual approximations that manually set other variables
that are now set automatically.
Change-Id: Ia0297404af08d7d3b42679d402a4a8048b5f05d5
diff --git a/Android.mk b/Android.mk
index 98ff0a6..23ddb7c 100644
--- a/Android.mk
+++ b/Android.mk
@@ -44,7 +44,7 @@
driver/rsdVertexArray.cpp
-LOCAL_SHARED_LIBRARIES += libRS libRSCpuRef libc++
+LOCAL_SHARED_LIBRARIES += libRS libRSCpuRef
LOCAL_SHARED_LIBRARIES += liblog libcutils libutils libEGL libGLESv1_CM libGLESv2
LOCAL_SHARED_LIBRARIES += libui libgui libsync
@@ -52,7 +52,8 @@
LOCAL_C_INCLUDES += frameworks/compile/libbcc/include
LOCAL_C_INCLUDES += frameworks/rs/cpu_ref/linkloader/include
-LOCAL_C_INCLUDES += external/libcxx/include
+
+LOCAL_CXX_STL := libc++
LOCAL_CFLAGS += $(rs_base_CFLAGS)
LOCAL_CPPFLAGS += -fno-exceptions
@@ -165,7 +166,7 @@
rsThreadIO.cpp \
rsType.cpp
-LOCAL_SHARED_LIBRARIES += liblog libcutils libutils libEGL libGLESv1_CM libGLESv2 libc++
+LOCAL_SHARED_LIBRARIES += liblog libcutils libutils libEGL libGLESv1_CM libGLESv2
LOCAL_SHARED_LIBRARIES += libgui libsync libdl libui
LOCAL_SHARED_LIBRARIES += libft2 libpng libz
@@ -173,7 +174,8 @@
LOCAL_C_INCLUDES += external/freetype/include
LOCAL_C_INCLUDES += frameworks/compile/libbcc/include
-LOCAL_C_INCLUDES += external/libcxx/include
+
+LOCAL_CXX_STL := libc++
LOCAL_CFLAGS += $(rs_base_CFLAGS)
# TODO: external/freetype still uses the register keyword
@@ -291,7 +293,6 @@
include $(CLEAR_VARS)
-
LOCAL_MODULE := librsloader
LOCAL_MODULE_TAGS := optional
@@ -299,13 +300,14 @@
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
+LOCAL_CXX_STL := libc++
+
LOCAL_CFLAGS += $(rs_base_CFLAGS)
LOCAL_CPPFLAGS += -fno-exceptions
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/cpu_ref/linkloader \
$(LOCAL_PATH)/cpu_ref/linkloader/include \
- external/libcxx/include \
$(LOCAL_C_INCLUDES)
include $(LLVM_ROOT_PATH)/llvm-device-build.mk
@@ -332,6 +334,8 @@
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
+LOCAL_CXX_STL := libc++
+
LOCAL_CFLAGS += $(rs_base_CFLAGS)
LOCAL_CFLAGS += -D__HOST__
LOCAL_CPPFLAGS += -fno-exceptions
@@ -345,7 +349,6 @@
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/cpu_ref/linkloader \
$(LOCAL_PATH)/cpu_ref/linkloader/include \
- external/libcxx/include \
$(LOCAL_C_INCLUDES)
endif