From 58c856b76ad423efe59a518b5f02752354e0d0d8 Mon Sep 17 00:00:00 2001 From: Henrik Gramner Date: Wed, 28 Sep 2022 13:57:59 +0200 Subject: build: strip() the result of cc.get_define() Whitespace is added to the result if compiling with MSVC using /std:c11 which breaks various things. Adding strip() fixes the problem. --- meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index c16594d..edb5415 100644 --- a/meson.build +++ b/meson.build @@ -63,7 +63,7 @@ endforeach # ASM option is_asm_enabled = (get_option('enable_asm') == true and (host_machine.cpu_family() == 'x86' or - (host_machine.cpu_family() == 'x86_64' and cc.get_define('__ILP32__') == '') or + (host_machine.cpu_family() == 'x86_64' and cc.get_define('__ILP32__').strip() == '') or host_machine.cpu_family() == 'aarch64' or host_machine.cpu_family().startswith('arm') or host_machine.cpu() == 'ppc64le')) @@ -409,7 +409,7 @@ if host_machine.cpu_family().startswith('x86') cdata_asm.set10('PIC', true) # Convert SSE asm into (128-bit) AVX when compiler flags are set to use AVX instructions - cdata_asm.set10('FORCE_VEX_ENCODING', cc.get_define('__AVX__') != '') + cdata_asm.set10('FORCE_VEX_ENCODING', cc.get_define('__AVX__').strip() != '') endif cdata.set10('ARCH_PPC64LE', host_machine.cpu() == 'ppc64le') -- cgit v1.2.3