meson: Let user choose x86_64 SIMD extension for release build

pull/30/head
Andri Yngvason 2020-04-10 12:35:05 +00:00
parent 297e22b588
commit a0d49f774a
2 changed files with 4 additions and 2 deletions

View File

@ -23,7 +23,7 @@ endif
cpu = host_machine.cpu_family() cpu = host_machine.cpu_family()
if cpu == 'x86_64' if cpu == 'x86_64'
c_args += '-mavx' c_args += '-m' + get_option('x86_64-simd')
elif cpu == 'arm' elif cpu == 'arm'
c_args += '-mfpu=neon' c_args += '-mfpu=neon'
endif endif

View File

@ -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('tight-encoding', type: 'feature', value: 'auto', description: 'Enable Tight encoding')
option('tls', type: 'feature', value: 'auto', description: 'Enable encryption & authentication') 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')