Mesa (staging/21.1): meson/vulkan: fix linkage on windows

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon May 10 19:45:55 UTC 2021


Module: Mesa
Branch: staging/21.1
Commit: f08e0a2016bf40c055df360a1c3b745ec8b463d0
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f08e0a2016bf40c055df360a1c3b745ec8b463d0

Author: Dylan Baker <dylan.c.baker at intel.com>
Date:   Wed Apr 28 16:14:58 2021 -0700

meson/vulkan: fix linkage on windows

The current approach likley breaks icl and clang-cl, but it seems that
the problem isn't even really related to MSVC, but to Meson's Visual
Studio backend, as such, let's use link-whole unless we're using a
Visual Studio backend.

Fixes: 48d31a6280c4de07279435606a5c0524c1787cad
       ("meson: link vulkan_util with link_whole on mingw")

Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
Acked-by: James Park <jpark37 at lagfreegames.com>
(cherry picked from commit f03da01fe374b87b5144c77f56ab78cf7c2a2ed3)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10379>

---

 .pick_status.json           | 2 +-
 src/vulkan/util/meson.build | 5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index be369e5b1f7..cf38321bbd0 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1957,7 +1957,7 @@
         "description": "meson/vulkan: fix linkage on windows",
         "nominated": false,
         "nomination_type": 1,
-        "resolution": 4,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "48d31a6280c4de07279435606a5c0524c1787cad"
     },
diff --git a/src/vulkan/util/meson.build b/src/vulkan/util/meson.build
index 8b51d076b46..1a3723990bc 100644
--- a/src/vulkan/util/meson.build
+++ b/src/vulkan/util/meson.build
@@ -125,7 +125,10 @@ idep_vulkan_util_headers = declare_dependency(
   include_directories : include_directories('.')
 )
 
-if cc.get_id() == 'msvc'
+# This is likely a bug in the Meson VS backend, as MSVC with ninja works fine.
+# See this discussion here:
+# https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10506 
+if get_option('backend').startswith('vs')
   idep_vulkan_util = declare_dependency(
     link_with : libvulkan_util,
     dependencies : idep_vulkan_util_headers



More information about the mesa-commit mailing list