Warning, /graphics/krita/3rdparty/ext_icu/0004-meson-Use-NASM-to-work-around-MSVC-compiler-performa.patch is written in an unsupported language. File is not indexed.
0001 From 4bb188dadbc842a69fc0cd37bb615cb84160c9d8 Mon Sep 17 00:00:00 2001
0002 From: "L. E. Segovia" <amy@amyspark.me>
0003 Date: Sun, 20 Nov 2022 14:08:43 -0300
0004 Subject: [PATCH 4/7] meson: Use NASM to work around MSVC compiler performance
0005 issues
0006
0007 ---
0008 source/data/dummy.c | 8 ++++++++
0009 source/data/meson.build | 9 ++++++---
0010 2 files changed, 14 insertions(+), 3 deletions(-)
0011 create mode 100644 source/data/dummy.c
0012
0013 diff --git a/source/data/dummy.c b/source/data/dummy.c
0014 new file mode 100644
0015 index 0000000..e924b26
0016 --- /dev/null
0017 +++ b/source/data/dummy.c
0018 @@ -0,0 +1,8 @@
0019 +#include <stdlib.h>
0020 +
0021 +int dummy(void);
0022 +
0023 +int dummy(void)
0024 +{
0025 + return 0;
0026 +}
0027 diff --git a/source/data/meson.build b/source/data/meson.build
0028 index cb98e95..25dfd91 100644
0029 --- a/source/data/meson.build
0030 +++ b/source/data/meson.build
0031 @@ -16,14 +16,17 @@ if host_machine.system() == 'windows' and get_option('default_library') == 'stat
0032 endif
0033
0034 if cpp.get_argument_syntax() == 'msvc'
0035 + if (host_machine.cpu_family() == 'x86' or host_machine.cpu_family() == 'x86_64') and add_languages('nasm', required: false)
0036 + icudata_asm_output = '@0@.asm'.format(U_ICUDATA_NAME)
0037 + icudata_command += ['-a', 'nasm']
0038 ## Uncomment if you want to use MASM (>= 0.64), but be aware
0039 ## it is Very Slow to build.
0040 - # if add_languages('masm', required: false)
0041 + # elif add_languages('masm', required: false)
0042 # icudata_asm_output = '@0@.masm'.format(U_ICUDATA_NAME)
0043 # icudata_command += ['-a', 'masm']
0044 - # else
0045 + else
0046 icudata_asm_output = '@0@.c'.format(U_ICUDATA_NAME)
0047 - # endif
0048 + endif
0049 elif host_machine.system() == 'cygwin'
0050 icudata_asm_output = '@0@.S'.format(U_ICUDATA_NAME)
0051 icudata_command += ['-a', 'gcc-cygwin']
0052 --
0053 2.24.1.windows.2
0054