From 19ff16387a0c844552f4956dfbce176fd62c1cc8 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Thu, 8 Aug 2024 15:23:34 -0700 Subject: [PATCH] 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 Part-of: --- meson_options.txt | 8 ++++++++ src/gallium/targets/dri/meson.build | 8 +++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/meson_options.txt b/meson_options.txt index a3f98b0696a..f00a2787a68 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -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', diff --git a/src/gallium/targets/dri/meson.build b/src/gallium/targets/dri/meson.build index b79281d3542..40950351172 100644 --- a/src/gallium/targets/dri/meson.build +++ b/src/gallium/targets/dri/meson.build @@ -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,