android: simplify building libgallium_dri on Android

The versioned libgallium library can be confusing on Android, and it is
probably not even needed there, so simplify the build on Android by
always build the unversioned `libgallium_dri.so` overriding the
`-Dunversion-libgallium=true` option added in
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30579

Remove also all the bits that deal with the versioned library which are
not needed anymore.

Fixes: 9568976c52 ("android: fix build in multiple ways")
Acked-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Mauro Rossi <issor.oruam@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30641>
This commit is contained in:
Antonio Ospite
2024-08-13 10:44:50 +02:00
committed by Marge Bot
parent cf0884d161
commit 2d2bc5b307
3 changed files with 3 additions and 9 deletions

View File

@@ -26,7 +26,6 @@ ifneq ($(filter true, $(BOARD_MESA3D_USES_MESON_BUILD)),)
LOCAL_PATH := $(call my-dir)
MESA3D_TOP := $(dir $(LOCAL_PATH))
MESA3D_VERSION = $(shell cat $(MESA3D_TOP)/VERSION)
LIBDRM_VERSION = $(shell cat external/libdrm/meson.build | grep -o "\<version\>\s*:\s*'\w*\.\w*\.\w*'" | grep -o "\w*\.\w*\.\w*" | head -1)
MESA_VK_LIB_SUFFIX_amd := radeon
@@ -158,7 +157,7 @@ endif
endef
ifneq ($(strip $(BOARD_MESA3D_GALLIUM_DRIVERS)),)
# Module 'libgallium_dri', produces '/vendor/lib{64}/libgallium-$MESA3D_VERSION.so'
# Module 'libgallium_dri', produces '/vendor/lib{64}/libgallium_dri.so'
# This module also trigger DRI symlinks creation process
$(eval $(call mesa3d-lib,libgallium_dri,,MESA3D_GALLIUM_BIN))
# Module 'libglapi', produces '/vendor/lib{64}/libglapi.so'

View File

@@ -64,7 +64,7 @@ MESON_GEN_DIR := $(MESON_OUT_DIR)_GEN
MESON_GEN_FILES_TARGET := $(MESON_GEN_DIR)/.timestamp
MESA3D_GALLIUM_DIR := $(MESON_OUT_DIR)/install/usr/local/lib
$(M_TARGET_PREFIX)MESA3D_GALLIUM_BIN := $(MESON_OUT_DIR)/install/usr/local/lib/libgallium-$(MESA3D_VERSION).so
$(M_TARGET_PREFIX)MESA3D_GALLIUM_BIN := $(MESON_OUT_DIR)/install/usr/local/lib/libgallium_dri.so
$(M_TARGET_PREFIX)MESA3D_LIBEGL_BIN := $(MESON_OUT_DIR)/install/usr/local/lib/libEGL.so
$(M_TARGET_PREFIX)MESA3D_LIBGLESV1_BIN := $(MESON_OUT_DIR)/install/usr/local/lib/libGLESv1_CM.so
$(M_TARGET_PREFIX)MESA3D_LIBGLESV2_BIN := $(MESON_OUT_DIR)/install/usr/local/lib/libGLESv2.so
@@ -285,16 +285,11 @@ endif
$(MESON_BUILD)
touch $@
MESON_COPY_LIBGALLIUM := \
cp $(MESA3D_GALLIUM_DIR)/libgallium-$(MESA3D_VERSION).so $($(M_TARGET_PREFIX)TARGET_OUT_VENDOR_SHARED_LIBRARIES)
$(MESON_OUT_DIR)/install/.install.timestamp: MESON_COPY_LIBGALLIUM:=$(MESON_COPY_LIBGALLIUM)
$(MESON_OUT_DIR)/install/.install.timestamp: MESON_BUILD:=$(MESON_BUILD)
$(MESON_OUT_DIR)/install/.install.timestamp: $(MESON_OUT_DIR)/.build.timestamp
rm -rf $(dir $@)
mkdir -p $(dir $@)
DESTDIR=$(call relative-to-absolute,$(dir $@)) $(MESON_BUILD) install
$(if $(BOARD_MESA3D_GALLIUM_DRIVERS),$(MESON_COPY_LIBGALLIUM))
touch $@
$($(M_TARGET_PREFIX)MESA3D_LIBGBM_BIN) $(MESA3D_GLES_BINS): $(MESON_OUT_DIR)/install/.install.timestamp

View File

@@ -22,7 +22,7 @@ if with_ld_dynamic_list
gallium_dri_link_depends += files('../dri.dyn')
endif
if get_option('unversion-libgallium')
if get_option('unversion-libgallium') or with_platform_android
libgallium_name = 'gallium_dri'
else
libgallium_name = 'gallium-@0@'.format(meson.project_version())