Andrew Geissler | 475cb72 | 2020-07-10 16:00:51 -0500 | [diff] [blame] | 1 | From dd1d15c75f6ff8ee96cf1e7b74e582bff3183ef6 Mon Sep 17 00:00:00 2001 |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 2 | From: Alistair Francis <alistair@alistair23.me> |
| 3 | Date: Thu, 14 Nov 2019 13:08:31 -0800 |
Brad Bishop | 6dbb316 | 2019-11-25 09:41:34 -0500 | [diff] [blame] | 4 | Subject: [PATCH] meson.build: make TLS ELF optional |
| 5 | |
| 6 | USE_ELF_TLS has replaced GLX_USE_TLS so this patch is the original "make |
| 7 | TLS GLX optional again" patch updated to the latest mesa. |
| 8 | |
| 9 | Upstream-Status: Inappropriate [configuration] |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 10 | Signed-off-by: Alistair Francis <alistair@alistair23.me> |
Brad Bishop | 6dbb316 | 2019-11-25 09:41:34 -0500 | [diff] [blame] | 11 | |
| 12 | --- |
| 13 | meson.build | 2 +- |
| 14 | meson_options.txt | 6 ++++++ |
| 15 | 2 files changed, 7 insertions(+), 1 deletion(-) |
| 16 | |
| 17 | diff --git a/meson.build b/meson.build |
Andrew Geissler | 475cb72 | 2020-07-10 16:00:51 -0500 | [diff] [blame] | 18 | index 261b588..311436e 100644 |
Brad Bishop | 6dbb316 | 2019-11-25 09:41:34 -0500 | [diff] [blame] | 19 | --- a/meson.build |
| 20 | +++ b/meson.build |
Andrew Geissler | 475cb72 | 2020-07-10 16:00:51 -0500 | [diff] [blame] | 21 | @@ -392,7 +392,7 @@ if with_egl and not (with_platform_drm or with_platform_surfaceless or with_plat |
Brad Bishop | 6dbb316 | 2019-11-25 09:41:34 -0500 | [diff] [blame] | 22 | endif |
| 23 | |
| 24 | # Android uses emutls for versions <= P/28. For USE_ELF_TLS we need ELF TLS. |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 25 | -if host_machine.system() != 'windows' and (not with_platform_android or get_option('platform-sdk-version') >= 29) |
Brad Bishop | 6dbb316 | 2019-11-25 09:41:34 -0500 | [diff] [blame] | 26 | +if (not with_platform_android or get_option('platform-sdk-version') >= 29) and get_option('elf-tls') |
| 27 | pre_args += '-DUSE_ELF_TLS' |
| 28 | endif |
| 29 | |
| 30 | diff --git a/meson_options.txt b/meson_options.txt |
Andrew Geissler | 475cb72 | 2020-07-10 16:00:51 -0500 | [diff] [blame] | 31 | index ab43150..d7b1555 100644 |
Brad Bishop | 6dbb316 | 2019-11-25 09:41:34 -0500 | [diff] [blame] | 32 | --- a/meson_options.txt |
| 33 | +++ b/meson_options.txt |
Andrew Geissler | 475cb72 | 2020-07-10 16:00:51 -0500 | [diff] [blame] | 34 | @@ -355,6 +355,12 @@ option( |
Brad Bishop | 6dbb316 | 2019-11-25 09:41:34 -0500 | [diff] [blame] | 35 | value : true, |
| 36 | description : 'Enable direct rendering in GLX and EGL for DRI', |
| 37 | ) |
| 38 | +option( |
| 39 | + 'elf-tls', |
| 40 | + type : 'boolean', |
| 41 | + value : true, |
| 42 | + description : 'Enable TLS support in ELF', |
| 43 | +) |
| 44 | option( |
Andrew Geissler | 475cb72 | 2020-07-10 16:00:51 -0500 | [diff] [blame] | 45 | 'prefer-iris', |
Brad Bishop | 6dbb316 | 2019-11-25 09:41:34 -0500 | [diff] [blame] | 46 | type : 'boolean', |