meson: Set 'auto' as the default neon option value

The default for the neon build option is 'no', which disabled NEON code
for 32-bit ARM but enabled it for ARM64. Now that 'no' can disable NEON
code for ARM64, the default should be 'auto' which would enable it where
possible. Handle the 'auto' value, and set it as the default.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
This commit is contained in:
Alper Nebi Yasak 2024-10-30 03:11:57 +03:00 committed by Arun Raghavan
parent b7a194f824
commit fc5a4946af
2 changed files with 10 additions and 1 deletions

View File

@ -166,6 +166,15 @@ if ['x86', 'x86_64'].contains(host_machine.cpu_family())
endif endif
neon_opt = get_option('neon') neon_opt = get_option('neon')
if neon_opt == 'auto'
if have_arm64
neon_opt = 'yes'
elif have_neon
neon_opt = 'runtime'
else
neon_opt = 'no'
endif
endif
if neon_opt == 'runtime' if neon_opt == 'runtime'
warning('webrtc cannot check NEON support at runtime, will build without NEON') warning('webrtc cannot check NEON support at runtime, will build without NEON')
have_neon = false have_neon = false

View File

@ -2,7 +2,7 @@ option('gnustl', type: 'feature',
value: 'auto', value: 'auto',
description: 'Use gnustl for a c++ library implementation (only used on Android)') description: 'Use gnustl for a c++ library implementation (only used on Android)')
option('neon', type: 'combo', option('neon', type: 'combo',
choices: ['no', 'yes', 'auto', 'runtime'], choices: ['auto', 'yes', 'runtime', 'no'],
description: 'Enable NEON optimisations') description: 'Enable NEON optimisations')
option('inline-sse', type: 'boolean', option('inline-sse', type: 'boolean',
value: true, value: true,