Module: Mesa
Branch: main
Commit: 2091515a70a07c3e4b80cb7637a2194790e285bb
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=2091515a70a07c3e4b80cb7637a2194790e285bb

Author: Janne Grunau <[email protected]>
Date:   Sun Nov 19 09:34:59 2023 +0100

gallium: Do not create pipe-loader version scripts for disabled drivers

They are not going to be used without shared library to build.

Fixes: 667de678a06 ("gallium: Fix undefined symbols in version scripts")
Signed-off-by: Janne Grunau <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26273>

---

 src/gallium/targets/pipe-loader/meson.build | 36 +++++++++++++++--------------
 1 file changed, 19 insertions(+), 17 deletions(-)

diff --git a/src/gallium/targets/pipe-loader/meson.build 
b/src/gallium/targets/pipe-loader/meson.build
index b7a04c9d722..943faec469d 100644
--- a/src/gallium/targets/pipe-loader/meson.build
+++ b/src/gallium/targets/pipe-loader/meson.build
@@ -63,6 +63,10 @@ pipe_loaders = [
 ]
 
 foreach x : pipe_loaders
+  if not x[0]
+    continue
+  endif
+
   pipe_sym_config = configuration_data()
 
   foreach d : [[x[1] in ['r300', 'r600', 'radeonsi'], 
'radeon_drm_winsys_create'],
@@ -88,21 +92,19 @@ foreach x : pipe_loaders
     cur_pipe_loader_link_deps += pipe_sym
   endif
 
-  if x[0]
-    shared_library(
-      'pipe_@0@'.format(x[1]),
-      'pipe_@[email protected]'.format(x[1]),
-      c_args : [pipe_loader_comp_args, '-DPIPE_LOADER_DYNAMIC=1'],
-      cpp_args : [pipe_loader_comp_args],
-      gnu_symbol_visibility : 'hidden',
-      link_args : cur_pipe_loader_link_args,
-      link_depends : cur_pipe_loader_link_deps,
-      include_directories : pipe_loader_incs,
-      link_with : [pipe_loader_link_with, x[3]],
-      dependencies : [idep_mesautil, idep_nir, dep_thread, x[2]],
-      name_prefix : '',
-      install : true,
-      install_dir : pipe_loader_install_dir,
-    )
-  endif
+  shared_library(
+    'pipe_@0@'.format(x[1]),
+    'pipe_@[email protected]'.format(x[1]),
+    c_args : [pipe_loader_comp_args, '-DPIPE_LOADER_DYNAMIC=1'],
+    cpp_args : [pipe_loader_comp_args],
+    gnu_symbol_visibility : 'hidden',
+    link_args : cur_pipe_loader_link_args,
+    link_depends : cur_pipe_loader_link_deps,
+    include_directories : pipe_loader_incs,
+    link_with : [pipe_loader_link_with, x[3]],
+    dependencies : [idep_mesautil, idep_nir, dep_thread, x[2]],
+    name_prefix : '',
+    install : true,
+    install_dir : pipe_loader_install_dir,
+  )
 endforeach

Reply via email to