mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
Add x86 CPU check in meson.build for clang build fix
have_avx = cc.has_argument(avx_args) gcc generates an error when AVX is unsupported, whereas clang only produces a warning. Thus, using Clang on the RISC-V platform incorrectly enables AVX file compilation, leading to build failures.
This commit is contained in:
parent
1af1fc846c
commit
60981494d6
1 changed files with 23 additions and 14 deletions
|
|
@ -127,6 +127,14 @@ if have_cpp
|
||||||
add_project_arguments(cxx.get_supported_arguments(cxx_flags), language: 'cpp')
|
add_project_arguments(cxx.get_supported_arguments(cxx_flags), language: 'cpp')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
have_sse = false
|
||||||
|
have_sse2 = false
|
||||||
|
have_ssse3 = false
|
||||||
|
have_sse41 = false
|
||||||
|
have_fma = false
|
||||||
|
have_avx = false
|
||||||
|
have_avx2 = false
|
||||||
|
if host_machine.cpu_family() in ['x86', 'x86_64']
|
||||||
sse_args = '-msse'
|
sse_args = '-msse'
|
||||||
sse2_args = '-msse2'
|
sse2_args = '-msse2'
|
||||||
ssse3_args = '-mssse3'
|
ssse3_args = '-mssse3'
|
||||||
|
|
@ -142,6 +150,7 @@ have_sse41 = cc.has_argument(sse41_args)
|
||||||
have_fma = cc.has_argument(fma_args)
|
have_fma = cc.has_argument(fma_args)
|
||||||
have_avx = cc.has_argument(avx_args)
|
have_avx = cc.has_argument(avx_args)
|
||||||
have_avx2 = cc.has_argument(avx2_args)
|
have_avx2 = cc.has_argument(avx2_args)
|
||||||
|
endif
|
||||||
|
|
||||||
have_neon = false
|
have_neon = false
|
||||||
if host_machine.cpu_family() == 'aarch64'
|
if host_machine.cpu_family() == 'aarch64'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue