diff --git a/meson.build b/meson.build
index 501957e35e1..8ee027f1a1e 100644
--- a/meson.build
+++ b/meson.build
@@ -378,8 +378,10 @@ 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 host_machine.system() != 'windows' and (not with_platform_android or get_option('platform-sdk-version') >= 29)
-  pre_args += '-DUSE_ELF_TLS'
+if host_machine.system() != 'windows' and (not with_platform_android or get_option('platform-sdk-version') >= 29) 
+  if get_option('use-elf-tls')
+    pre_args += '-DUSE_ELF_TLS'
+  endif
 endif
 
 if with_glx != 'disabled'
diff --git a/meson_options.txt b/meson_options.txt
index b768c15053c..381cfb435ba 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -214,6 +214,12 @@ option(
   choices : ['auto', 'disabled', 'dri', 'xlib', 'gallium-xlib'],
   description : 'Build support for GLX platform'
 )
+option(
+  'use-elf-tls',
+  type : 'boolean',
+  value : true,
+  description : 'Build support for initial-exec TLS model on ELF platform'
+)
 option(
   'egl',
   type : 'combo',
