From 10244fe76ed29bfd238e09ec7d430a9d0dcf95a9 Mon Sep 17 00:00:00 2001 From: James Park Date: Wed, 3 Feb 2021 10:32:02 -0800 Subject: [PATCH] vulkan: Fix source list for vulkan_wsi on Windows I don't think link_whole works right for VS project generation, but MSVC doesn't support GCC weak functions anyway, so work around it. Acked-by: Jesse Natalie Part-of: --- src/vulkan/util/meson.build | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/vulkan/util/meson.build b/src/vulkan/util/meson.build index e3830f8ed91..cb72275dd57 100644 --- a/src/vulkan/util/meson.build +++ b/src/vulkan/util/meson.build @@ -99,9 +99,16 @@ idep_vulkan_util_headers = declare_dependency( include_directories : include_directories('.') ) -idep_vulkan_util = declare_dependency( - # Instruct users of this library to link with --whole-archive. Otherwise, - # our weak function overloads may not resolve properly. - link_whole : libvulkan_util, - dependencies : idep_vulkan_util_headers -) +if with_platform_windows + idep_vulkan_util = declare_dependency( + link_with : libvulkan_util, + dependencies : idep_vulkan_util_headers + ) +else + idep_vulkan_util = declare_dependency( + # Instruct users of this library to link with --whole-archive. Otherwise, + # our weak function overloads may not resolve properly. + link_whole : libvulkan_util, + dependencies : idep_vulkan_util_headers + ) +endif