mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 13:50:11 +01:00
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>
This commit is contained in:
parent
446630ab42
commit
ddf708a1ff
1 changed files with 9 additions and 1 deletions
10
meson.build
10
meson.build
|
|
@ -1104,6 +1104,8 @@ if host_machine.system() == 'windows'
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
sse2_arg = []
|
||||||
|
sse2_args = []
|
||||||
sse41_args = []
|
sse41_args = []
|
||||||
with_sse41 = false
|
with_sse41 = false
|
||||||
if host_machine.cpu_family().startswith('x86')
|
if host_machine.cpu_family().startswith('x86')
|
||||||
|
|
@ -1114,6 +1116,9 @@ if host_machine.cpu_family().startswith('x86')
|
||||||
sse41_args = ['-msse4.1']
|
sse41_args = ['-msse4.1']
|
||||||
|
|
||||||
if host_machine.cpu_family() == 'x86'
|
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')
|
if get_option('sse2')
|
||||||
# These settings make generated GCC code match MSVC and follow
|
# These settings make generated GCC code match MSVC and follow
|
||||||
# GCC advice on https://gcc.gnu.org/wiki/FloatingPointMath#x86note
|
# 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
|
# XXX: We could have SSE without -mstackrealign if we always used
|
||||||
# __attribute__((force_align_arg_pointer)), but that's not
|
# __attribute__((force_align_arg_pointer)), but that's not
|
||||||
# always the case.
|
# 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
|
else
|
||||||
# GCC on x86 (not x86_64) with -msse* assumes a 16 byte aligned stack, but
|
# GCC on x86 (not x86_64) with -msse* assumes a 16 byte aligned stack, but
|
||||||
# that's not guaranteed
|
# that's not guaranteed
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue