Module: Mesa
Branch: main
Commit: b68582b1c5b3b226a9ad88ac18a3fb21a81226e9
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=b68582b1c5b3b226a9ad88ac18a3fb21a81226e9

Author: Jordan Justen <[email protected]>
Date:   Wed Mar 29 23:30:44 2023 -0700

meson: Check for the __builtin_ia32_clflushopt function

Signed-off-by: Jordan Justen <[email protected]>
Reviewed-by: Lionel Landwerlin <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22379>

---

 meson.build | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/meson.build b/meson.build
index 0aa07eb08d7..8aa133dbb2e 100644
--- a/meson.build
+++ b/meson.build
@@ -1170,6 +1170,16 @@ if host_machine.cpu_family().startswith('x86')
   endif
 endif
 
+# Detect __builtin_ia32_clflushopt support
+if cc.has_function('__builtin_ia32_clflushopt', args : '-mclflushopt')
+  pre_args += '-DHAVE___BUILTIN_IA32_CLFLUSHOPT'
+  clflushopt_args = ['-mclflushopt']
+  with_clflushopt = true
+else
+  clflushopt_args = []
+  with_clflushopt = false
+endif
+
 # Check for GCC style atomics
 dep_atomic = null_dep
 

Reply via email to