From 6864769c4dc2933ec25048cb8c1e9f240c94f345 Mon Sep 17 00:00:00 2001 From: "L. E. Segovia" Date: Sun, 25 Feb 2024 13:46:05 -0300 Subject: [PATCH] [meson] Block uses of hb-static throughout Microsoft compilers PE-COFF cannot export extern, non-dllexport symbols. --- src/meson.build | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/meson.build b/src/meson.build index c64afa5a9..daa919805 100644 --- a/src/meson.build +++ b/src/meson.build @@ -682,7 +682,8 @@ if conf.get('HAVE_CAIRO', 0) == 1 endif if get_option('tests').enabled() - # TODO: MSVC gives the following, + # TODO: Microsoft LINK gives the following because extern, non dllexport + # symbols can only be used when linking against a static library # error LNK2019: unresolved external symbol "unsigned __int64 const * const _hb_NullPool" if cpp.get_define('_MSC_FULL_VER') == '' noinst_programs = { @@ -729,8 +730,8 @@ if get_option('tests').enabled() 'test-unicode-ranges': ['test-unicode-ranges.cc'], } foreach name, source : compiled_tests - if cpp.get_argument_syntax() == 'msvc' and source.contains('hb-static.cc') - # TODO: MSVC doesn't like tests having hb-static.cc, fix them + if cpp.get_define('_MSC_FULL_VER') != '' and source.contains('hb-static.cc') + # TODO: Microsoft compilers cannot link tests using hb-static.cc, fix them continue endif test(name, executable(name, source,