meson: don't advertise TLS support if glx wasn't build with it
[mesa.git] / 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'