gallium: Add option to not add version to libgallium filename

This is unneeded in some environments, like ChromeOS and Android.  And
for CrOS it specifically causes problems with the gpu sandbox rules.. we
don't want to have to update the sandbox rules for each new mesa
version.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30579>
This commit is contained in:
Rob Clark
2024-08-08 15:23:34 -07:00
committed by Marge Bot
parent 19d44313a4
commit 19ff16387a
2 changed files with 15 additions and 1 deletions

View File

@@ -65,6 +65,14 @@ option(
description : 'Location to install dri drivers. Default: $libdir/dri.'
)
option(
'unversion-libgallium',
type : 'boolean',
value : false,
description : 'Do not include mesa version in libgallium DSO filename. ' +
'Do not enable unless you know what you are doing. Default: false'
)
option(
'dri-search-path',
type : 'string',

View File

@@ -22,8 +22,14 @@ if with_ld_dynamic_list
gallium_dri_link_depends += files('../dri.dyn')
endif
if get_option('unversion-libgallium')
libgallium_name = 'gallium_dri'
else
libgallium_name = 'gallium-@0@'.format(meson.project_version())
endif
libgallium_dri = shared_library(
'gallium-@0@'.format(meson.project_version()),
libgallium_name,
files('dri_target.c'),
include_directories : [
inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_util, inc_gallium_drivers,