From a0d49f774ab19f9f67a866de7f20a63394930c45 Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Fri, 10 Apr 2020 12:35:05 +0000 Subject: [PATCH] meson: Let user choose x86_64 SIMD extension for release build --- meson.build | 2 +- meson_options.txt | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 8c14b66..a3618e8 100644 --- a/meson.build +++ b/meson.build @@ -23,7 +23,7 @@ endif cpu = host_machine.cpu_family() if cpu == 'x86_64' - c_args += '-mavx' + c_args += '-m' + get_option('x86_64-simd') elif cpu == 'arm' c_args += '-mfpu=neon' endif diff --git a/meson_options.txt b/meson_options.txt index 107baee..ed83cb1 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,3 +1,5 @@ +option('examples', type: 'boolean', value: false, description: 'Build examples') option('tight-encoding', type: 'feature', value: 'auto', description: 'Enable Tight encoding') option('tls', type: 'feature', value: 'auto', description: 'Enable encryption & authentication') -option('examples', type: 'boolean', value: false, description: 'Build examples') +option('x86_64-simd', type: 'string', value: 'avx', + description: 'Choose SIMD extension for x86_64 release build')