[babl/wip/msvc] extensions: Export init() on MSVC builds



commit 74d4551072bc4f14bad1ee2b2b85e5ab87a0c3aa
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Mon Jan 20 17:49:02 2020 +0800

    extensions: Export init() on MSVC builds
    
    We also do not want to use GCC-esque linker flags which MSVC does not
    understand.
    
    All tests on Visual Studio builds pass without the SIMD optimizations at this
    point, as they are being disabled, which will be enabled later.
    
    Visual Studio 2017 15.5 or later will be required due to the use of musl
    items.

 extensions/meson.build | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/extensions/meson.build b/extensions/meson.build
index acfbbcb97..a17fbc33e 100644
--- a/extensions/meson.build
+++ b/extensions/meson.build
@@ -16,7 +16,11 @@ babl_ext_inc = [
 babl_ext_link_args = [
 ]
 if platform_win32
-  babl_ext_link_args += '-Wl,--no-undefined'
+  if cc.get_id() == 'msvc'
+    babl_ext_link_args += '-export:init'
+  else
+    babl_ext_link_args += '-Wl,--no-undefined'
+  endif
 endif
 
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]