meson: Check for the __builtin_ia32_clflushopt function

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22379>
This commit is contained in:
Jordan Justen 2023-03-29 23:30:44 -07:00 committed by Marge Bot
parent 6f30c980dd
commit b68582b1c5

View File

@ -1170,6 +1170,16 @@ if host_machine.cpu_family().startswith('x86')
endif endif
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 # Check for GCC style atomics
dep_atomic = null_dep dep_atomic = null_dep