meson: Raise error for setting 'neon' when unsupported

We can set -Dneon=yes on x86, which will fail during build because the
x86 compiler doesn't understand the resulting `-mfpu=neon` flag. Make the
'neon' build option cause an error in the setup stage if we didn't
detect hardware support for NEON.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
This commit is contained in:
Alper Nebi Yasak 2024-10-30 03:14:42 +03:00 committed by Arun Raghavan
parent fc5a4946af
commit 2493b6e659

View File

@ -175,6 +175,9 @@ if neon_opt == 'auto'
neon_opt = 'no'
endif
endif
if neon_opt != 'no' and not have_neon
error('Compiler or architecture does not support NEON')
endif
if neon_opt == 'runtime'
warning('webrtc cannot check NEON support at runtime, will build without NEON')
have_neon = false