meson: don't advertise TLS support if glx wasn't build with it
authorEric Engestrom <eric.engestrom@intel.com>
Thu, 21 Nov 2019 22:14:50 +0000 (22:14 +0000)
committerMarge Bot <eric+marge@anholt.net>
Mon, 31 Aug 2020 09:14:57 +0000 (09:14 +0000)
Fixes: a47c525f328 ("meson: build glx")
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5630>

meson.build
src/meson.build

index 661a01e82b42b88a98b11f2223e0c406e570621d..85a724ffc98d35fd824b83b52921ea6c7e018d06 100644 (file)
@@ -427,8 +427,10 @@ else
 endif
 
 # Android uses emutls for versions <= P/28. For USE_ELF_TLS we need ELF TLS.
+use_elf_tls = false
 if not ['windows', 'freebsd'].contains(host_machine.system()) and (not with_platform_android or get_option('platform-sdk-version') >= 29)
   pre_args += '-DUSE_ELF_TLS'
+  use_elf_tls = true
 endif
 
 if with_glx != 'disabled'
index 1d8e7633369abbde7d1ff2e522fb87bf97cf18e7..ed0a3091d6dfd4f3ed662c9ca654175491717019 100644 (file)
@@ -126,6 +126,6 @@ if with_glx != 'disabled' and not with_glvnd
     libraries : libgl,
     libraries_private : gl_priv_libs,
     requires_private : gl_priv_reqs,
-    variables : ['glx_tls=yes'],
+    variables : ['glx_tls=@0@'.format(use_elf_tls ? 'yes' : 'no')],
   )
 endif