[Mesa-dev] [PATCH v4 09/49] meson: fix dl detection on non cygwin windows

Dylan Baker dylan at pnwbakers.com
Wed Aug 22 17:04:32 UTC 2018


v4: - Don't run checks on Windows that will always fail

Signed-off-by: Dylan Baker <dylan.c.baker at intel.com>
Reviewed-by: Eric Anholt <eric at anholt.net> (v3)
Reviewed-by: Eric Engestrom <eric.engestrom at intel.com>
---
 meson.build | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/meson.build b/meson.build
index 9298c5ecce6..a5cb5be226c 100644
--- a/meson.build
+++ b/meson.build
@@ -1030,14 +1030,15 @@ if build_machine.system() != 'darwin'
 endif
 
 # check for dl support
-if cc.has_function('dlopen')
-  dep_dl = null_dep
-else
-  dep_dl = cc.find_library('dl')
-endif
-if cc.has_function('dladdr', dependencies : dep_dl)
-  # This is really only required for megadrivers
-  pre_args += '-DHAVE_DLADDR'
+dep_dl = null_dep
+if host_machine.system() != 'windows'
+  if not cc.has_function('dlopen')
+    dep_dl = cc.find_library('dl')
+  endif
+  if cc.has_function('dladdr', dependencies : dep_dl)
+    # This is really only required for megadrivers
+    pre_args += '-DHAVE_DLADDR'
+  endif
 endif
 
 if cc.has_function('dl_iterate_phdr')
-- 
2.18.0



More information about the mesa-dev mailing list