From 3b1166da8ca329771432c9fe7a9c0c9633b344d7 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Thu, 30 Jan 2025 09:50:37 -0500 Subject: [PATCH] meson: factor out with_driver_using_cl adding a new bindgen-using driver should not require touching 4 different meson files! factor out the expression, since it's a pain otherwise. Signed-off-by: Alyssa Rosenzweig Reviewed-by: Lionel Landwerlin Part-of: --- meson.build | 9 +++++---- src/compiler/clc/meson.build | 5 +---- src/compiler/spirv/meson.build | 5 +---- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/meson.build b/meson.build index 27847afb706..b639200c60c 100644 --- a/meson.build +++ b/meson.build @@ -828,6 +828,9 @@ else with_drivers_clc = false endif +with_driver_using_cl = with_gallium_iris or with_intel_vk or \ + with_gallium_asahi or with_asahi_vk + if get_option('mesa-clc') == 'system' prog_mesa_clc = find_program('mesa_clc', native : true) prog_vtn_bindgen = find_program('vtn_bindgen', native : true) @@ -835,10 +838,8 @@ if get_option('mesa-clc') == 'system' with_clc = with_gallium_rusticl else with_clc = get_option('mesa-clc') != 'auto' or \ - with_microsoft_clc or with_drivers_clc or \ - with_gallium_iris or with_intel_vk or \ - with_gallium_asahi or with_asahi_vk or \ - with_gallium_rusticl + with_microsoft_clc or with_gallium_rusticl or \ + with_drivers_clc or with_driver_using_cl endif dep_clc = null_dep diff --git a/src/compiler/clc/meson.build b/src/compiler/clc/meson.build index 743cd236bb5..263eba52719 100644 --- a/src/compiler/clc/meson.build +++ b/src/compiler/clc/meson.build @@ -120,10 +120,7 @@ idep_mesaclc = declare_dependency( link_args : _idep_mesaclc_link_args, ) -if get_option('mesa-clc') != 'system' and (with_gallium_asahi or \ - with_asahi_vk or \ - with_intel_vk or \ - with_gallium_iris or \ +if get_option('mesa-clc') != 'system' and (with_driver_using_cl or \ get_option('install-mesa-clc')) prog_mesa_clc = executable( 'mesa_clc', diff --git a/src/compiler/spirv/meson.build b/src/compiler/spirv/meson.build index 80531bff1f7..179e1ad5636 100644 --- a/src/compiler/spirv/meson.build +++ b/src/compiler/spirv/meson.build @@ -77,10 +77,7 @@ spirv2nir = executable( install : with_tools.contains('nir'), ) -if get_option('mesa-clc') != 'system' and (with_gallium_asahi or \ - with_asahi_vk or \ - with_intel_vk or \ - with_gallium_iris or \ +if get_option('mesa-clc') != 'system' and (with_driver_using_cl or \ get_option('install-mesa-clc')) prog_vtn_bindgen = executable( 'vtn_bindgen',