meson/libmesa: ensure shader_replacement.h is generated before using it

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: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41617>
This commit is contained in:
Eric Engestrom 2026-05-15 15:04:51 +02:00 committed by Marge Bot
parent 4cd9ccd943
commit 8b7e44e2ef

View file

@ -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(