From bffdd05a79961bce5439f01af811669130eceaae Mon Sep 17 00:00:00 2001 From: Yiwei Zhang Date: Thu, 7 Mar 2024 20:02:52 -0800 Subject: [PATCH] vulkan: fix runtime libraries' dep against generated headers This change adds a new generated header dep to the runtime internal library dependencies. This ensures the headers are generated before the below libraries are compiled: - libvulkan_lite_runtime (already satisfied due to file sources) - libvulkan_lite_instance - libvulkan_runtime - libvulkan_instance Fixes: fe2ec50844d ("vulkan: allow building venus without libcompiler") Signed-off-by: Yiwei Zhang Reviewed-by: Yonggang Luo Reviewed-by: Eric Engestrom Part-of: --- src/vulkan/runtime/meson.build | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/vulkan/runtime/meson.build b/src/vulkan/runtime/meson.build index 1db4aeb5166..29e1de2b51c 100644 --- a/src/vulkan/runtime/meson.build +++ b/src/vulkan/runtime/meson.build @@ -213,21 +213,34 @@ vk_format_info = custom_target( ) vulkan_lite_runtime_files += [ - vk_common_entrypoints, - vk_cmd_queue, vk_cmd_enqueue_entrypoints, + vk_cmd_queue, + vk_common_entrypoints, vk_dispatch_trampolines, + vk_format_info, vk_physical_device_features, vk_physical_device_properties, vk_synchronization_helpers, - vk_format_info, ] idep_vulkan_common_entrypoints_h = declare_dependency( sources : [vk_common_entrypoints[0]] ) -vulkan_lite_runtime_deps += idep_vulkan_common_entrypoints_h +# as a runtime library dep to ensure header gen order +vulkan_lite_runtime_header_gen_deps = declare_dependency( + sources : [ + vk_cmd_enqueue_entrypoints[0], + vk_cmd_queue[1], + vk_common_entrypoints[0], + vk_dispatch_trampolines[1], + vk_format_info[1], + vk_physical_device_features[1], + vk_physical_device_properties[1], + ], +) + +vulkan_lite_runtime_deps += vulkan_lite_runtime_header_gen_deps libvulkan_lite_runtime = static_library( 'vulkan_lite_runtime',