From e1d80571606684af869317837902abc6f6e82017 Mon Sep 17 00:00:00 2001 From: Kishore Kadiyala Date: Mon, 11 Mar 2019 11:23:03 +0200 Subject: android: static link with libexpat with Android O+ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Tapani Pälli Reviewed-by: Eric Engestrom --- src/gallium/targets/dri/Android.mk | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/gallium/targets/dri') diff --git a/src/gallium/targets/dri/Android.mk b/src/gallium/targets/dri/Android.mk index 7638a67b26f..6134251b5ca 100644 --- a/src/gallium/targets/dri/Android.mk +++ b/src/gallium/targets/dri/Android.mk @@ -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 -- cgit v1.2.3