diff --git a/src/amd/vulkan/meson.build b/src/amd/vulkan/meson.build index ea449a5150b..d0ee8233c07 100644 --- a/src/amd/vulkan/meson.build +++ b/src/amd/vulkan/meson.build @@ -170,8 +170,13 @@ libvulkan_radeon_ld_args = [] libvulkan_radeon_link_depends = [] if with_ld_version_script - libvulkan_radeon_ld_args += ['-Wl,--version-script', join_paths(meson.current_source_dir(), 'vulkan.sym')] - libvulkan_radeon_link_depends += files('vulkan.sym') + if with_platform_android + libvulkan_radeon_ld_args += ['-Wl,--version-script', join_paths(meson.current_source_dir(), 'vulkan-android.sym')] + libvulkan_radeon_link_depends += files('vulkan-android.sym') + else + libvulkan_radeon_ld_args += ['-Wl,--version-script', join_paths(meson.current_source_dir(), 'vulkan.sym')] + libvulkan_radeon_link_depends += files('vulkan.sym') + endif endif radv_build_id = get_option('radv-build-id') diff --git a/src/amd/vulkan/vulkan-android.sym b/src/amd/vulkan/vulkan-android.sym new file mode 100644 index 00000000000..2ca40faa09e --- /dev/null +++ b/src/amd/vulkan/vulkan-android.sym @@ -0,0 +1,16 @@ +{ + global: + vk_icdGetInstanceProcAddr; + vk_icdGetPhysicalDeviceProcAddr; + vk_icdNegotiateLoaderICDInterfaceVersion; + + # Andoid looks for this global in HAL modules. In the source it occurs + # as HAL_MODULE_INFO_SYM (which is just a #define for HMI) and it's an + # instance of struct hwvulkan_module_t. + HMI; + + local: + # When static linking LLVM, all its symbols are public API. + # That may cause symbol collision, so explicitly demote everything. + *; +}; diff --git a/src/amd/vulkan/vulkan.sym b/src/amd/vulkan/vulkan.sym index 2ca40faa09e..c85a22e905a 100644 --- a/src/amd/vulkan/vulkan.sym +++ b/src/amd/vulkan/vulkan.sym @@ -4,11 +4,6 @@ vk_icdGetPhysicalDeviceProcAddr; vk_icdNegotiateLoaderICDInterfaceVersion; - # Andoid looks for this global in HAL modules. In the source it occurs - # as HAL_MODULE_INFO_SYM (which is just a #define for HMI) and it's an - # instance of struct hwvulkan_module_t. - HMI; - local: # When static linking LLVM, all its symbols are public API. # That may cause symbol collision, so explicitly demote everything.