diff options
author | Yonggang Luo <luoyonggang@gmail.com> | 2023-02-17 14:24:20 +0800 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2023-02-27 13:50:11 +0000 |
commit | ddf708a1ff0992839f9fb5fd135690cd97175c75 (patch) | |
tree | 8dfe26050ae51880b2758830f45d11839ab24b1b /meson.build | |
parent | 446630ab422d6967b68d3b801df33f883d8fb555 (diff) | |
download | mesa-ddf708a1ff0992839f9fb5fd135690cd97175c75.tar.gz |
meson: Split sse2_arg and sse2_args out of c_cpp_args
This is used to replace c_sse2_arg and c_sse2_args in latter commits
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21375>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/meson.build b/meson.build index 36c1d0d7808..de030fbd04d 100644 --- a/meson.build +++ b/meson.build @@ -1104,6 +1104,8 @@ if host_machine.system() == 'windows' endif endif +sse2_arg = [] +sse2_args = [] sse41_args = [] with_sse41 = false if host_machine.cpu_family().startswith('x86') @@ -1114,6 +1116,9 @@ if host_machine.cpu_family().startswith('x86') sse41_args = ['-msse4.1'] if host_machine.cpu_family() == 'x86' + # x86_64 have sse2 by default, so sse2 args only for x86 + sse2_arg = ['-msse2', '-mfpmath=sse'] + sse2_args = [sse2_arg, '-mstackrealign'] if get_option('sse2') # These settings make generated GCC code match MSVC and follow # GCC advice on https://gcc.gnu.org/wiki/FloatingPointMath#x86note @@ -1126,7 +1131,10 @@ if host_machine.cpu_family().startswith('x86') # XXX: We could have SSE without -mstackrealign if we always used # __attribute__((force_align_arg_pointer)), but that's not # always the case. - c_cpp_args += ['-msse2', '-mfpmath=sse', '-mstackrealign'] + c_cpp_args += sse2_args + # sse2_args are adopted into c_cpp_args to avoid duplicated sse2 command line args + sse2_arg = [] + sse2_args = [] else # GCC on x86 (not x86_64) with -msse* assumes a 16 byte aligned stack, but # that's not guaranteed |