diff options
author | Matthew Waters <matthew@centricular.com> | 2018-11-05 22:49:46 +1100 |
---|---|---|
committer | Matthew Waters <matthew@centricular.com> | 2018-11-08 20:56:52 +1100 |
commit | 27e93ee86b5ad07ff058236d9dab196b95d1e463 (patch) | |
tree | 79be10fca7572af106b3c233cc1b38f9b5540061 | |
parent | 682857751b8a76f264e02d9e6541bb9736526bbf (diff) |
build/meson: fix compilation on arm64
The assembly files used don't use the right comments for arm64
-rw-r--r-- | meson.build | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/meson.build b/meson.build index 52a49f7..37990ea 100644 --- a/meson.build +++ b/meson.build @@ -47,21 +47,25 @@ have_arm = false have_armv7 = false have_neon = false have_x86 = false -if ['arm', 'armv7', 'aarch64'].contains(host_machine.cpu_family()) - have_arm = true - arch_cflags = ['-DWEBRTC_ARCH_ARM'] +if ['arm', 'armv7'].contains(host_machine.cpu_family()) + if cc.compiles('''#ifdef __ARM_ARCH_ISA_ARM +#error no arm arch +#endif''') + have_arm = true + arch_cflags += ['-DWEBRTC_ARCH_ARM'] + endif if cc.compiles('''#ifndef __ARM_ARCH_7A__ #error no armv7 arch #endif''') have_armv7 = true - arch_cflags = ['-DWEBRTC_ARCH_ARM_V7'] + arch_cflags += ['-DWEBRTC_ARCH_ARM_V7'] endif - if cc.compiles('''#ifndef __aarch64__ +endif +if cc.compiles('''#ifndef __aarch64__ #error no aarch64 arch #endif''') - have_neon = true - arch_cflags = ['-DWEBRTC_ARCH_ARM64', '-DWEBRTC_HAS_NEON'] - endif + have_neon = true + arch_cflags += ['-DWEBRTC_ARCH_ARM64', '-DWEBRTC_HAS_NEON'] endif if ['x86', 'x86_64'].contains(host_machine.cpu_family()) have_x86 = true |