From d3cca2726699125173c24d496d770aa2cefda122 Mon Sep 17 00:00:00 2001 From: "L. E. Segovia" Date: Sun, 20 Nov 2022 14:08:43 -0300 Subject: [PATCH 7/9] meson: Use NASM to work around MSVC compiler performance issues --- source/data/dummy.c | 8 ++++++++ source/data/meson.build | 9 ++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 source/data/dummy.c diff --git a/source/data/dummy.c b/source/data/dummy.c new file mode 100644 index 0000000..e924b26 --- /dev/null +++ b/source/data/dummy.c @@ -0,0 +1,8 @@ +#include + +int dummy(void); + +int dummy(void) +{ + return 0; +} diff --git a/source/data/meson.build b/source/data/meson.build index cf296f0..30238df 100644 --- a/source/data/meson.build +++ b/source/data/meson.build @@ -9,14 +9,17 @@ if host_machine.system() == 'windows' and get_option('default_library') == 'stat endif if cpp.get_argument_syntax() == 'msvc' + if (host_machine.cpu_family() == 'x86' or host_machine.cpu_family() == 'x86_64') and add_languages('nasm', required: false) + icudata_asm_output = '@0@.asm'.format(U_ICUDATA_NAME) + icudata_command += ['-a', 'nasm'] ## Uncomment if you want to use MASM (>= 0.64), but be aware ## it is Very Slow to build. - # if add_languages('masm', required: false) + # elif add_languages('masm', required: false) # icudata_asm_output = '@0@.masm'.format(U_ICUDATA_NAME) # icudata_command += ['-a', 'masm'] - # else + else icudata_asm_output = '@0@.c'.format(U_ICUDATA_NAME) - # endif + endif elif host_machine.system() == 'cygwin' icudata_asm_output = '@0@.S'.format(U_ICUDATA_NAME) icudata_command += ['-a', 'gcc-cygwin'] -- 2.37.1.windows.1