panvk: do not export needless symbols
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

This might be a bit overly careful, but it seems like a good idea to use
both mechanisms to avoid accidental symbol leakage. I also don't think
it matters much in practice, because all sane applications use the the
Vulkan loader, and that shouldn't forward these symbols anyway.

While we're at it, let's wire up a test so we notice if this stops
working.

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37371>
This commit is contained in:
Erik Faye-Lund 2025-09-15 14:30:30 +02:00 committed by Marge Bot
parent a69853ce5e
commit 17a17c3f89

View file

@ -164,6 +164,7 @@ foreach arch : [6, 7, 10, 12, 13]
idep_libpan_per_arch[arch.to_string()],
],
c_args : [no_override_init_args, panvk_flags, '-DPAN_ARCH=@0@'.format(arch)],
gnu_symbol_visibility : 'hidden',
)
endforeach
@ -213,10 +214,24 @@ libvulkan_panfrost = shared_library(
idep_mesautil,
],
c_args : [no_override_init_args, panvk_flags],
link_args : [ld_args_bsymbolic, ld_args_gc_sections, ld_args_build_id],
link_args : [vulkan_icd_link_args, ld_args_bsymbolic, ld_args_gc_sections, ld_args_build_id],
gnu_symbol_visibility : 'hidden',
install : true,
)
if with_symbols_check
test(
'panvk symbols check',
symbols_check,
args : [
'--lib', libvulkan_panfrost,
'--symbols-file', vulkan_icd_symbols,
symbols_check_args,
],
suite : ['panfrost'],
)
endif
panfrost_icd = custom_target(
'panfrost_icd',
input : [vk_icd_gen, vk_api_xml],