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')