diff options
author | Henrik Gramner <gramner@twoorioles.com> | 2022-09-28 14:57:59 +0300 |
---|---|---|
committer | Henrik Gramner <henrik@gramner.com> | 2022-09-28 17:12:31 +0300 |
commit | 58c856b76ad423efe59a518b5f02752354e0d0d8 (patch) | |
tree | 4768ed35441b4641f8c620fbeb0047c14788c65f | |
parent | 0b0b5fbf832a8744b72eaf085253138b82d7a7a3 (diff) |
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.
-rw-r--r-- | meson.build | 4 |
1 files 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') |