Mesa (master): meson: Add wrap for libelf on Windows

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Apr 22 10:58:25 UTC 2021


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

Author: James Park <jpark37 at lagfreegames.com>
Date:   Tue Apr 13 00:43:13 2021 -0700

meson: Add wrap for libelf on Windows

Uses release from Lag Free Games GitHub, which applies Windows build
fixes to FreeBSD libelf.

The amd_common library uses libelf.

Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10202>

---

 meson.build             | 6 +++++-
 subprojects/libelf.wrap | 6 ++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index 7c1cc07fd59..59713ea3201 100644
--- a/meson.build
+++ b/meson.build
@@ -1686,7 +1686,11 @@ with_opencl_native = _opencl != 'disabled' and get_option('opencl-native')
 if (with_amd_vk or with_gallium_radeonsi or
     (with_gallium_opencl and with_opencl_native) or
     (with_gallium_r600 and with_llvm))
-  dep_elf = dependency('libelf', required : false)
+  if with_platform_windows
+    dep_elf = dependency('libelf', required : false, fallback : ['libelf', 'libelf_dep'])
+  else
+    dep_elf = dependency('libelf', required : false)
+  endif
   if not dep_elf.found()
     dep_elf = cc.find_library('elf')
   endif
diff --git a/subprojects/libelf.wrap b/subprojects/libelf.wrap
new file mode 100644
index 00000000000..ea69baba9be
--- /dev/null
+++ b/subprojects/libelf.wrap
@@ -0,0 +1,6 @@
+[wrap-git]
+directory = libelf-lfg-win32-1.0.0-freebsd-12.1.0
+
+url = https://github.com/LagFreeGames/libelf-lfg-win32.git
+revision = 1.0.0
+depth = 1



More information about the mesa-commit mailing list