Mesa (master): meson: don't advertise TLS support if glx wasn't build with it

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Aug 31 09:28:27 UTC 2020


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

Author: Eric Engestrom <eric.engestrom at intel.com>
Date:   Thu Nov 21 22:14:50 2019 +0000

meson: don't advertise TLS support if glx wasn't build with it

Fixes: a47c525f328 ("meson: build glx")
Signed-off-by: Eric Engestrom <eric.engestrom at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5630>

---

 meson.build     | 2 ++
 src/meson.build | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index 661a01e82b4..85a724ffc98 100644
--- a/meson.build
+++ b/meson.build
@@ -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'
diff --git a/src/meson.build b/src/meson.build
index 1d8e7633369..ed0a3091d6d 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -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



More information about the mesa-commit mailing list