OSDN Git Service

android: build with libcxx on android lollipop
authorChih-Wei Huang <cwhuang@android-x86.org>
Wed, 20 May 2015 03:25:39 +0000 (11:25 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Thu, 16 Jul 2015 13:48:42 +0000 (21:48 +0800)
The libcxx introduced in android lollipop can be used to
replace stlport.

Fallback to use stlport when build with earlier android
releases.

Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Android.common.mk
src/egl/main/Android.mk
src/gallium/drivers/nouveau/Android.mk
src/gallium/drivers/r600/Android.mk
src/glsl/Android.mk

index bf4277f..68b858c 100644 (file)
@@ -69,6 +69,7 @@ endif
 endif
 
 LOCAL_CPPFLAGS += \
+       $(if $(filter true,$(MESA_LOLLIPOP_BUILD)),-std=c++11) \
        -Wno-error=non-virtual-dtor \
        -Wno-non-virtual-dtor
 
index bf803ca..ec73cb9 100644 (file)
@@ -102,7 +102,6 @@ endif
 ifneq ($(filter nouveau, $(MESA_GPU_DRIVERS)),)
 gallium_DRIVERS +=  libmesa_winsys_nouveau libmesa_pipe_nouveau
 LOCAL_SHARED_LIBRARIES += libdrm_nouveau
-LOCAL_SHARED_LIBRARIES += libstlport
 endif
 
 # r300g/r600g/radeonsi
@@ -115,7 +114,6 @@ endif # r300g
 ifneq ($(filter r600g radeonsi, $(MESA_GPU_DRIVERS)),)
 ifneq ($(filter r600g, $(MESA_GPU_DRIVERS)),)
 gallium_DRIVERS += libmesa_pipe_r600
-LOCAL_SHARED_LIBRARIES += libstlport
 endif # r600g
 ifneq ($(filter radeonsi, $(MESA_GPU_DRIVERS)),)
 gallium_DRIVERS += libmesa_pipe_radeonsi
@@ -124,6 +122,10 @@ gallium_DRIVERS += libmesa_pipe_radeon
 endif # r600g || radeonsi
 endif # r300g || r600g || radeonsi
 
+ifneq ($(filter nouveau r600g,$(MESA_GPU_DRIVERS)),)
+LOCAL_SHARED_LIBRARIES += $(if $(filter true,$(MESA_LOLLIPOP_BUILD)),libc++,libstlport)
+endif
+
 # vmwgfx
 ifneq ($(filter vmwgfx, $(MESA_GPU_DRIVERS)),)
 gallium_DRIVERS += libmesa_winsys_svga libmesa_pipe_svga
index 420c8e5..daf3abd 100644 (file)
@@ -39,6 +39,10 @@ LOCAL_SRC_FILES := \
 LOCAL_SHARED_LIBRARIES := libdrm libdrm_nouveau
 LOCAL_MODULE := libmesa_pipe_nouveau
 
+ifeq ($(MESA_LOLLIPOP_BUILD),true)
+LOCAL_C_INCLUDES := external/libcxx/include
+else
 include external/stlport/libstlport.mk
+endif
 include $(GALLIUM_COMMON_MK)
 include $(BUILD_STATIC_LIBRARY)
index e935759..bfe3987 100644 (file)
@@ -33,6 +33,10 @@ LOCAL_SRC_FILES := $(C_SOURCES) $(CXX_SOURCES)
 LOCAL_SHARED_LIBRARIES := libdrm libdrm_radeon
 LOCAL_MODULE := libmesa_pipe_r600
 
+ifeq ($(MESA_LOLLIPOP_BUILD),true)
+LOCAL_C_INCLUDES := external/libcxx/include
+else
 include external/stlport/libstlport.mk
+endif
 include $(GALLIUM_COMMON_MK)
 include $(BUILD_STATIC_LIBRARY)
index b5c05ab..68d767e 100644 (file)
@@ -44,7 +44,6 @@ LOCAL_C_INCLUDES := \
 
 LOCAL_MODULE := libmesa_glsl
 
-include external/stlport/libstlport.mk
 include $(LOCAL_PATH)/Android.gen.mk
 include $(MESA_COMMON_MK)
 include $(BUILD_STATIC_LIBRARY)