meson: update default build option for libva subproject

Add c_std=none as a default build option for when building libva as a
subproject, otherwise it will complain with messages such as:

../va/va_compat.h:90:9: error: expected declaration specifiers or '...' before string constant
   90 |     asm(".symver " #func "_" #major "_" #minor "_" #micro ", "

Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40493>
This commit is contained in:
Thong Thai 2026-03-25 18:44:01 +00:00 committed by Marge Bot
parent e9fe2aeba2
commit c8aaa8b902

View file

@ -737,7 +737,6 @@ _va_drivers = [
]
allow_fallback_for_libva = get_option('allow-fallback-for').contains('libva')
fallback_libva_options = []
_va = get_option('gallium-va') \
.require(_va_drivers.contains(true),
error_message : 'VA state tracker requires at least one of the following gallium drivers: r600, radeonsi, nouveau, d3d12 (with option gallium-d3d12-video), virgl.')
@ -745,8 +744,8 @@ _dep_va_name = host_machine.system() == 'windows' ? 'libva-win32' : 'libva'
dep_va = dependency(
_dep_va_name, version : '>= 1.8.0',
required : _va,
allow_fallback: allow_fallback_for_libva,
default_options: fallback_libva_options
allow_fallback : allow_fallback_for_libva,
default_options : [ 'c_std=none' ]
)
if dep_va.found()
dep_va_headers = dep_va.partial_dependency(compile_args : true, includes : true)