diff --git a/meson.build b/meson.build index ce2f901..5d2fb8a 100644 --- a/meson.build +++ b/meson.build @@ -166,6 +166,15 @@ if ['x86', 'x86_64'].contains(host_machine.cpu_family()) endif 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' warning('webrtc cannot check NEON support at runtime, will build without NEON') have_neon = false diff --git a/meson_options.txt b/meson_options.txt index d08f356..45c4bfb 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -2,7 +2,7 @@ option('gnustl', type: 'feature', value: 'auto', description: 'Use gnustl for a c++ library implementation (only used on Android)') option('neon', type: 'combo', - choices: ['no', 'yes', 'auto', 'runtime'], + choices: ['auto', 'yes', 'runtime', 'no'], description: 'Enable NEON optimisations') option('inline-sse', type: 'boolean', value: true,