From: Jordan Justen Date: Thu, 30 Mar 2023 06:30:44 +0000 (-0700) Subject: meson: Check for the __builtin_ia32_clflushopt function X-Git-Tag: upstream/23.3.3~2400 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b68582b1c5b3b226a9ad88ac18a3fb21a81226e9;p=platform%2Fupstream%2Fmesa.git meson: Check for the __builtin_ia32_clflushopt function Signed-off-by: Jordan Justen Reviewed-by: Lionel Landwerlin Part-of: --- diff --git a/meson.build b/meson.build index 0aa07eb..8aa133d 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