Mesa (master): clover: Add version.lib dependency for Clang on Windows

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Dec 2 18:52:48 UTC 2020


Module: Mesa
Branch: master
Commit: 959e0177990356d450da87eda0e7f99039656960
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=959e0177990356d450da87eda0e7f99039656960

Author: Jesse Natalie <jenatali at microsoft.com>
Date:   Wed Nov 18 18:29:25 2020 -0800

clover: Add version.lib dependency for Clang on Windows

Reviewed-by: Karol Herbst <kherbst at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7680>

---

 src/gallium/targets/opencl/meson.build | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/gallium/targets/opencl/meson.build b/src/gallium/targets/opencl/meson.build
index e758e4c12d9..243f66e3497 100644
--- a/src/gallium/targets/opencl/meson.build
+++ b/src/gallium/targets/opencl/meson.build
@@ -85,6 +85,14 @@ if not (dep_clang.found() and dep_clang_usable)
   endif
 endif
 
+# Be explicit about only using this lib on Windows, to avoid picking
+# up random libs with the generic name 'libversion'
+if host_machine.system() == 'windows'
+  dep_version = cpp.find_library('version')
+else
+  dep_version = null_dep
+endif
+
 libopencl = shared_library(
   opencl_libname,
   [],
@@ -94,7 +102,7 @@ libopencl = shared_library(
   link_with : [libpipe_loader_dynamic, libgallium],
   dependencies : [
     idep_mesautil,
-    dep_clock, dep_dl, dep_unwind, dep_elf, dep_clang
+    dep_clock, dep_dl, dep_unwind, dep_elf, dep_clang, dep_version
   ],
   version : '@0 at .0.0'.format(opencl_version),
   install : true,



More information about the mesa-commit mailing list