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

Fixes: a47c525f32 ("meson: build glx")
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5630>
(cherry picked from commit 9ac1686422)
This commit is contained in:
Eric Engestrom 2019-11-21 22:14:50 +00:00 committed by Dylan Baker
parent 8f4094bb1c
commit fe8d18e752
3 changed files with 4 additions and 2 deletions

View file

@ -922,7 +922,7 @@
"description": "meson: don't advertise TLS support if glx wasn't build with it",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": "a47c525f3281a2753180e076c7e9b7772aff8f06"
},

View file

@ -423,8 +423,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'

View file

@ -123,6 +123,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