meson: check -mtls if has_exe_wrapper
authorMichel Zou <xantares09@hotmail.com>
Mon, 6 Dec 2021 19:16:19 +0000 (20:16 +0100)
committerMarge Bot <emma+marge@anholt.net>
Tue, 7 Dec 2021 22:24:52 +0000 (22:24 +0000)
Fixes: 60d95c5d (Auto-enable TLSDESC support)
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14086>

meson.build

index 53ec2c2..c987073 100644 (file)
@@ -502,7 +502,7 @@ endforeach
 if not have_mtls_dialect
   # need .run to check libc support. meson aborts when calling .run when
   # cross-compiling, but because this is just an optimization we can skip it
-  if meson.is_cross_build()
+  if meson.is_cross_build() and not meson.has_exe_wrapper()
     warning('cannot auto-detect -mtls-dialect when cross-compiling, using compiler default')
   else
     # -fpic to force dynamic tls, otherwise TLS relaxation defeats check