From 2493b6e659e74a8c64864ae14fa44a68ecc2dd4d Mon Sep 17 00:00:00 2001 From: Alper Nebi Yasak Date: Wed, 30 Oct 2024 03:14:42 +0300 Subject: [PATCH] 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 --- meson.build | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meson.build b/meson.build index 5d2fb8a..073c1ed 100644 --- a/meson.build +++ b/meson.build @@ -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