From 8b7e44e2efcd483ae790e2dbd6548bffd1602d13 Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Fri, 15 May 2026 15:04:51 +0200 Subject: [PATCH] meson/libmesa: ensure shader_replacement.h is generated before using it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit By adding it to the list of files needed to compile `libmesa` instead of relying on the racy "build this no matter what" mechanism which is intended only for root nodes (≈ the binaries that we provide to users). Part-of: --- src/mesa/meson.build | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/mesa/meson.build b/src/mesa/meson.build index 2b801082eac..979d70b1a2a 100644 --- a/src/mesa/meson.build +++ b/src/mesa/meson.build @@ -4,17 +4,6 @@ subdir('glapi') subdir('program') -if _shader_replacement != '' - shader_replacement_h = custom_target( - 'shader_replacement.h', - input: [files(_shader_replacement + '/process_shaders.py')], - output: 'shader_replacement.h', - command: [prog_python, '@INPUT0@', _shader_replacement, '@OUTPUT@'], - build_by_default : true, - build_always_stale : true, - ) -endif - # files shared between classic mesa and gallium mesa files_libmesa = files( 'main/accum.c', @@ -383,6 +372,17 @@ files_libmesa = files( 'vbo/vbo_util.h', ) +if _shader_replacement != '' + files_libmesa += custom_target( + 'shader_replacement.h', + input: [files(_shader_replacement + '/process_shaders.py')], + output: 'shader_replacement.h', + command: [prog_python, '@INPUT0@', _shader_replacement, '@OUTPUT@'], + build_by_default : false, + build_always_stale : true, + ) +endif + inc_libmesa_asm = [] format_fallback_c = custom_target(