meson: Check arm neon support before parsing neon option
The main if statment for the NEON option has been quite convoluted. The previous commits reduced what it does to a simple case: check NEON support and set have_neon on 32-bit ARM CPUs. Do that near the architecture definitions. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
This commit is contained in:
parent
6c914be933
commit
b7a194f824
10
meson.build
10
meson.build
@ -131,6 +131,9 @@ if host_machine.cpu_family() == 'arm'
|
|||||||
have_armv7 = true
|
have_armv7 = true
|
||||||
arch_cflags += ['-DWEBRTC_ARCH_ARM_V7']
|
arch_cflags += ['-DWEBRTC_ARCH_ARM_V7']
|
||||||
endif
|
endif
|
||||||
|
if cc.compiles('#include <arm_neon.h>', args : '-mfpu=neon')
|
||||||
|
have_neon = true
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
if cc.compiles('''#ifndef __aarch64__
|
if cc.compiles('''#ifndef __aarch64__
|
||||||
#error no aarch64 arch
|
#error no aarch64 arch
|
||||||
@ -163,13 +166,6 @@ if ['x86', 'x86_64'].contains(host_machine.cpu_family())
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
neon_opt = get_option('neon')
|
neon_opt = get_option('neon')
|
||||||
if neon_opt != 'no' and not have_neon
|
|
||||||
if neon_opt != 'runtime'
|
|
||||||
if cc.compiles('#include <arm_neon.h>', args : '-mfpu=neon')
|
|
||||||
have_neon = true
|
|
||||||
endif
|
|
||||||
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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user