aboutsummaryrefslogblamecommitdiffstats
path: root/main/mesa/add-use-elf-tls.patch
blob: a5cb620172739d094b0bf0c13baac69da2f462a5 (plain) (tree)
1
2
3
4
5
6
7
8
9
                                      
                             

                 
                                                                                                    


                                                                             
                                                                                                                                          
                                             
                                                                                                                                                               


                              
                                                  
                             

                       


                                                          



                    
                 

                                                           
diff --git a/meson.build b/meson.build
index d228de0..63818c5 100644
--- a/meson.build
+++ b/meson.build
@@ -392,7 +392,8 @@ if with_egl and not (with_platform_drm or with_platform_surfaceless or with_plat
 endif
 
 # Android uses emutls for versions <= P/28. For USE_ELF_TLS we need ELF TLS.
-if not ['windows', 'freebsd'].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'].contains(host_machine.system()) and (not with_platform_android or get_option('platform-sdk-version') >= 29)
   pre_args += '-DUSE_ELF_TLS'
 endif
 
diff --git a/meson_options.txt b/meson_options.txt
index ab43150..435a6e9 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -387,3 +387,9 @@ option(
   value : 'auto',
   description : 'Use ZSTD instead of ZLIB in some cases.'
 )
+option(
+  'use-elf-tls',
+  type : 'boolean',
+  value : false,
+  description : 'Build support for initial-exec TLS model'
+)