android: static link with libexpat with Android O+

In Android O, MESA needs to statically link libexpat so that
it's in same VNDK namespace.

v2: apply change also to anv driver (Tapani)
v3: use += in anv change (Eric Engestrom)

Change-Id: I82b0be5c817c21e734dfdf5bfb6a9aa1d414ab33
Signed-off-by: Kishore Kadiyala <kishore.kadiyala@intel.com>
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
This commit is contained in:
Kishore Kadiyala 2019-03-11 11:23:03 +02:00 committed by Tapani Pälli
parent 01cf390035
commit e1d8057160
5 changed files with 45 additions and 4 deletions

View file

@ -42,9 +42,17 @@ LOCAL_LDFLAGS := \
LOCAL_SHARED_LIBRARIES := \
libdl \
libglapi \
libexpat \
libz
# If Android version >=8 MESA should static link libexpat else should dynamic link
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 27; echo $$?), 0)
LOCAL_STATIC_LIBRARIES := \
libexpat
else
LOCAL_SHARED_LIBRARIES += \
libexpat
endif
ifeq ($(USE_LIBBACKTRACE),true)
LOCAL_SHARED_LIBRARIES += libbacktrace
endif

View file

@ -38,7 +38,17 @@ LOCAL_C_INCLUDES := \
$(MESA_TOP)/src/mapi \
$(MESA_TOP)/src/mesa
LOCAL_SHARED_LIBRARIES := libexpat libz liblog
LOCAL_SHARED_LIBRARIES := libz liblog
# If Android version >=8 MESA should static link libexpat else should dynamic link
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 27; echo $$?), 0)
LOCAL_STATIC_LIBRARIES := \
libexpat
else
LOCAL_SHARED_LIBRARIES += \
libexpat
endif
LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_genxml

View file

@ -337,8 +337,17 @@ LOCAL_WHOLE_STATIC_LIBRARIES := \
libmesa_intel_compiler \
libmesa_anv_entrypoints
LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES) libexpat libz libsync liblog
LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES) libz libsync liblog
LOCAL_HEADER_LIBRARIES += $(VULKAN_COMMON_HEADER_LIBRARIES)
# If Android version >=8 MESA should static link libexpat else should dynamic link
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 27; echo $$?), 0)
LOCAL_STATIC_LIBRARIES := \
libexpat
else
LOCAL_SHARED_LIBRARIES += \
libexpat
endif
include $(MESA_COMMON_MK)
include $(BUILD_SHARED_LIBRARY)

View file

@ -49,11 +49,19 @@ MESA_DRI_WHOLE_STATIC_LIBRARIES := \
MESA_DRI_SHARED_LIBRARIES := \
libcutils \
libdl \
libexpat \
libglapi \
liblog \
libz
# If Android version >=8 MESA should static link libexpat else should dynamic link
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 27; echo $$?), 0)
MESA_DRI_WHOLE_STATIC_LIBRARIES += \
libexpat
else
MESA_DRI_SHARED_LIBRARIES += \
libexpat
endif
#-----------------------------------------------
# Build drivers and libmesa_dri_common

View file

@ -41,8 +41,14 @@ LOCAL_C_INCLUDES := \
$(MESA_TOP)/src/gallium/include \
$(MESA_TOP)/src/gallium/auxiliary
# If Android version >=8 MESA should static link libexpat else should dynamic link
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 27; echo $$?), 0)
LOCAL_STATIC_LIBRARIES := \
libexpat
else
LOCAL_SHARED_LIBRARIES := \
libexpat
endif
LOCAL_MODULE := libmesa_util