aboutsummaryrefslogtreecommitdiffstats
path: root/main/mesa/add-use-elf-tls.patch
blob: 57babe28fc5081b09bed2077e0ce8f9efe59ba2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
diff --git a/meson.build b/meson.build
index 932eb13..a12bdb5 100644
--- a/meson.build
+++ b/meson.build
@@ -448,7 +448,8 @@ endif
 
 # Android uses emutls for versions <= P/28. For USE_ELF_TLS we need ELF TLS.
 use_elf_tls = false
-if not ['windows', 'freebsd', 'openbsd', 'haiku'].contains(host_machine.system()) and (not with_platform_android or get_option('platform-sdk-version') >= 29)
+with_use_elf_tls = get_option('use-elf-tls')
+if with_use_elf_tls and not ['windows', 'freebsd', 'openbsd', 'haiku'].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
diff --git a/meson_options.txt b/meson_options.txt
index fc73f6e..edd3886 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -464,3 +464,9 @@ option(
   value : true,
   description : 'use msse2 flag for mingw x86. Default: true',
 )
+option(
+  'use-elf-tls',
+  type : 'boolean',
+  value : false,
+  description : 'Build support for initial-exec TLS model'
+)